[DOCU-295] Autogeneration Created: 19/Jul/12  Updated: 05/Jun/14  Resolved: 23/Jul/12

Status: Closed
Project: Documentation
Component/s: content
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Antti Hietala Assignee: Antti Hietala
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 Description   

Document how autogeneration of components works. There is some material already in /reference/areas#Autogeneratedcontent on the documentation author instance. This feature should be documented in the Components reference because that's where people look for it. Cross-link from Areas reference. See also the training material. An example of autogenerated content can be found in the content area of stkFAQ page. The only implementation class in use at the moment is info.magnolia.rendering.generator.CopyGenerator.



 Comments   
Comment by Antti Hietala [ 19/Jul/12 ]

The nodeType and templateId properties are required by the CopyGenerator class. This means you cannot create nodes with these names with autogeneration but that won't be necessary anyway. Any other properties you add in the configuration will be generated.

The name of the node generated by the CopyGenerator will the same as the name of your configuration content node, for example singleton.

The CopyGenerator only generates nodes on creation. It is not additive. So if you define one component and the generator creates it, when you define another node in the same generator it won't be created unless you first delete the first component.

Comment by Ruth Stocks [ 19/Jul/12 ]

I have included a section about this in the STK docs at - http://docuauthor.magnolia-cms.com/templates/stk-4-5/template-definitions.html#Featurecomponents - it is still in draft form. I'll keep track of this ticket and amend later if necessary.

Comment by Jonas Petersen [X] (Inactive) [ 03/Jun/14 ]

Magnolia 4.5:
https://documentation.magnolia-cms.com/display/DOCS45/Template+definitions#Templatedefinitions-Autogeneratedcomponents

Magnolia 5:
https://documentation.magnolia-cms.com/display/DOCS/Component+definitions#Componentdefinitions-Autogeneratedcomponents

Generated at Mon Feb 12 01:07:46 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.