Magnolia 5.7 reached extended end of life on May 31, 2022. Support for this branch is limited, see End-of-life policy. Please note that to cover the extra maintenance effort, this EEoL period is a paid extension in the life of the branch. Customers who opt for the extended maintenance will need a new license key to run future versions of Magnolia 5.7. If you have any questions or to subscribe to the extended maintenance, please get in touch with your local contact at Magnolia.
This pages gives an overview of how you can reuse the configuration within JCR-based and in YAML definition items.
Definition items
A definition item is a configuration of a "component" to execute tasks in a Magnolia instance. Template definitions, dialog definitions, app definitions (also known as app descriptors), renderer definitions, themes definitions, field definitions are all examples of such definition items. They can be configured via JCR in the configuration
workspace.
Most (but not all) of these items can be configured via YAML. A YAML-based configuration requires Magnolia version 5.4 or higher. All items which can be configured via YAML are registered in a specific registry. Registered items can be seen in the Definitions app.
Reusing definition items
Within both JCR configuration and YAML files you can use mechanisms to reuse existing configuration.
YAML include
Use !include
in a YAML file to reuse a snippet or a complete YAML-based configuration. Reference the includable as Magnolia Resource (which can be from any origin).
For further details please read YAML include.
YAML inherit
Use !inherit
in a YAML file to inherit a registered definition item. You can inherit on root level only.
For further details please read YAML inherit.
JCR extends
The JCR extends mechanism is based on JCR nodes and properties. JCR configuration data can be extended on any node level, and thus on any level of configuration. JCR extends allow to extend sub items of a JCR-defined item definition.
For further details please read JCR extends.