4

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?

  • 2
    Are you referring to branch templates, in which a tree of items are created? – Michael West Aug 23 '18 at 0:46
  • I didn't know what branch templates were until I read Richard's response, but it sounds like just the thing I need. – Necromancer Aug 24 '18 at 3:15
6

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.

Create Branch Template

enter image description here

Now create your structure:

enter image description here

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! – Necromancer Aug 24 '18 at 3:16
  • 1
    This is working like a charm, thanks again Richard! – Necromancer Aug 29 '18 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.