Magnolia 5.4 reached end of life on November 15, 2018. This branch is no longer supported, see End-of-life policy.
Inherited components are displayed on child pages automatically. Inheritance saves editors time and effort and it helps display content consistently across the site. For example, use inheritance for promotional content that changes often. When you update the content on the home page it updates everywhere in the page hierarchy.
Inheritance behaves like this by default:
Configure component inheritance in an area definition. Simple example where all components are inherited:
areas: promos: renderType: freemarker type: list availableComponents: text: id: my-module:components/text inheritance: enabled: true components: all
Node name | Value |
---|---|
areas | |
promos | |
availableComponents | |
text | |
id | my-module:components/text |
inheritance | |
components | all |
enabled | true |
Properties:
| optional, default is
|
| optional, default is Defines which components are inherited to child pages. Valid values:
|
| optional, default is Inherits area properties such as Valid values:
|
nodeComparatorClass | optional, default is Defines the order in which inherited components are displayed on the child page. The default
NodeDepthComparator
follows the order of nodes in the JCR repository. Nodes higher up in the hierarchy are displayed before nodes deeper down. Nodes on the same level are displayed as siblings. This means that inherited components are displayed in the same order on parent and child pages by default. You can implement a custom |
predicateClass | optional, default is In Java, predicate is a functional interface that returns either |
2 Comments
Emilio Garza
Christoph Meier – Do you have any information on how I can create this 'Show in subpage' checkbox in my component's dialog with YAML/Light Module Development so I can leverage the components: filtered property? And maybe it would be helpful to include a link to that information on that bullet point above?
Emilio Garza
It looks like it just takes when I made a checkbox by the name 'inheritance' no my component. So nevermind that works for me!