Work with a branch template

Current version: 10.0

You can create a branch template in several ways.

Note

When a user creates an item using the branch template, Sitecore replicates all descendants of the branch template definition item before expanding tokens. These items contain a copy of the content, renderings, and so on, of the branch at the time the items were created - any changes applied to the branch template after the items were created do not automatically appear on the created items.

Create a branch template

To create a branch template:

  1. In the Template Manager or the Content Editor, go to /Sitecore/Templates/Branches, right-click a folder and then click Insert, Branch Folder to create any required project-specific folders.

  2. In the content tree, click the relevant project-specific folder and insert a new branch template definition item using the /System/Branches/Branch data template.

  3. With the newly created branch template definition item selected, right-click and insert one or more items or hierarchies of items.

Create a branch template for a data template

You can insert a branch template containing a single item based on a specific data template.

To create a branch template for a data template:

  1. In the Template Manager or the Content Editor, within /Sitecore/Templates/Branches, insert any required project-specific folders using the /System/Branches/Branch Folder data template.

  2. Under the relevant project-specific folder, insert a new branch template using the /Branches/System/Branch/New Branch command template.

  3. In the Create a New Branch dialog box, select the data template, and then click Create. Sitecore creates a new branch template definition item containing a single item named $name based on the selected data template.

Note

By default, insert options for branch folders include the /Branches/System/Branch/New Branch command template, but not the /System/Branches/Branch data template.

Create a branch template by duplicating an existing item

You can create a branch template by duplicating one or more existing items or branches of items.

To create a branch template by duplicating one or more existing items:

  1. In the Content Editor or the Template Manager, insert a branch template using the /System/Branches/Branch data template.

  2. In the Content Editor, on the View tab, select the Hidden items check box to display the hidden items.

  3. Select the item you want to duplicate to populate the new branch template.

  4. On the Home tab, on the ribbon, in the Operations group, click Copy To.

  5. In the Copy Item To dialog box, select the branch template, and then click Copy.

    Sitecore copies the item or hierarchy of items to create a new item or hierarchy of items under the branch template definition item.

  6. Optionally, on the View tab, clear the Hidden items check box to hide hidden items again.

Do you have some feedback for us?

If you have suggestions for improving this article,