I'm trying to see if I can setup child templates, on a given parent template, that would show up every time the parent template is used to create an item. I tried adding the child templates to the template item itself, which it allows you to do, but after saving and refreshing the tree I created a content item using the modified template but the child items where not present. I tried this on the Standard Values item as well but no cigar. Is there some trick to this or is it just not possible?
1 Answer
welcome to SSE.
If I'm understanding your question right, it sounds like you need to use branch templates to do this.
A branch template will allow you to set a predefined tree structure, like a parent item with 1 or more child items. Then you would setup your insert options so that instead of inserting a new item based on the parent template, you would insert a new item based on the Branch template
When that item is created in the content tree, the child items will also be created.
Creating a Branch Template
To create a branch template, navigate to /sitecore/templates/Branches
and you can start there. Add a new Branch
and the wizard will ask you to select the item template you want to base the branch off.
Now create your structure:
Once you have done that, set the insert options to insert the new Branch
you created, and it will automatically create all the child items too.
-
This sounds like just the thing I need. Tomorrow first thing I'll try it out, if it works as expected I'll mark this as the answer. Thanx! Aug 24, 2018 at 3:16
-
1