Magnolia 6.1 reached end of life on March 31, 2021. This branch is no longer supported, see End-of-life policy.
Autogeneration creates components inside an area automatically, without editor involvement. Anything you define inside the content
item will be autogenerated.
Autogenerated components behave different from normal components:
Configure component autogeneration in an area definition, under the autoGeneration
item. Simple example:
areas: footer: renderType: freemarker type: single autoGeneration: content: quotation: nodeType: mgnl:component templateId: my-module:components/quotation quotationText: <p>Carpe diem.</p> citedPerson: Horace generatorClass: info.magnolia.rendering.generator.CopyGenerator
Node name | Value |
---|---|
areas | |
footer | |
autoGeneration | |
content | |
quotation | |
citedPerson | Horace |
nodeType | mgnl:component |
quotationText | <p>Carpe diem.</p> |
templateId | my-module:components/quotation |
generatorClass | info.magnolia.rendering.generator.CopyGenerator |
renderType | freemarker |
type | single |
Properties under autogeneration
:
| required Parent item for autogenerated content. Put everything you want to autogenerate inside this item. |
| required |
| required Value |
| required Component ID in |
generatorClass | required , default is A generator creates nodes based on the definition. The default
CopyGenerator
creates a copy of the exact nodes and properties you define under the |