...
Configure component autogeneration in an area definition, under the autoGeneration
item. Simple example:
Localtab Group |
---|
Localtab |
---|
|
Code Block |
---|
|
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 Localtab |
---|
|
|
Advanced Tables - Table Plus |
---|
heading | 0 |
---|
multiple | false |
---|
enableHeadingAttributes | false |
---|
enableSorting | false |
---|
class | m5-configuration-tree |
---|
enableHighlighting | false |
---|
|
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
:
content
| required Parent item for autogenerated content. Put everything you want to autogenerate inside this item. |
<component name>
| required |
nodeType
| required Value mgnl:component defines the referenced item as a component and generates a component node. |
templateId
| required Component ID in <module>:<path> format that references a component definition . |
generatorClass | required , default is info.magnolia.rendering.generator.CopyGenerator A generator creates nodes based on the definition. The default Javadoc |
---|
0 | info.magnolia.rendering.generator.CopyGenerator |
---|
| creates a copy of the exact nodes and properties you define under the content item. You can implement a custom generator class that does something else. Implement the Javadoc |
---|
0 | info.magnolia.rendering.generator.Generator |
---|
| interface. |