Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Template configuration support #269

Merged
merged 3 commits into from
Jan 20, 2020
Merged

Template configuration support #269

merged 3 commits into from
Jan 20, 2020

Conversation

johanjanssens
Copy link
Member

@johanjanssens johanjanssens commented Jan 20, 2020

This PR requires: joomlatools/joomlatools-framework#352

This PR adds support for per page Joomla template configuration. It adds a template config option to the process in the frontmatter.

---
process:
    template:
        name: Beez3
        config:
            templatecolor: red
        modules: ["Main Menu", 17]
---

Template config options

  • name: Defines the name of the template to use
  • config: Defines an associative array of template config settings
  • modules: Defines a list of modules to include, either by name or by id

Note: when specifying a different template through name no default template config options will be loaded. If no template name is specified the active template config options will be loaded the the configdefines the overrides for the active template.

Including modules

By default modules are limited to the list provided. This allows to ensure no other modules then those listed can be present on the page. If the list is empty no modules will be included in the page.

Example: modules: ["Main Menu", 17]

Excluding modules

If the module name or module id is prepended with a '-' the module will be excluded instead. This allows any module expect the ones listed to be present on the page.

Example: modules: ["-Main Menu", -17]

Add a 'template' config option to process that offers following config
options:

- 'name' defines the name if the template to use for the page
- 'config' defines the config options for the template to override
- 'modules' defines a an array of module names or id to include

Note, if the module name or id is prepended with a - the module will be
excluded instead.
@johanjanssens johanjanssens added this to the 0.17.0 milestone Jan 20, 2020
@johanjanssens johanjanssens self-assigned this Jan 20, 2020
@johanjanssens johanjanssens merged commit c5880e3 into master Jan 20, 2020
@johanjanssens johanjanssens deleted the feature/268-template branch January 20, 2020 16:06
@johanjanssens johanjanssens mentioned this pull request Jan 22, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant