The 5.7 branch of Magnolia reached End-of-Life on December 31, 2023, as specified in our End-of-life policy. This means the 5.7 branch is no longer maintained or supported. Please upgrade to the latest Magnolia release. By upgrading, you will get the latest release of Magnolia featuring significant improvements to the author and developer experience. For a successful upgrade, please consult our Magnolia 6.2 documentation. If you need help, please contact info@magnolia-cms.com.

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.