Wednesday, September 17, 2014

Sitecore Branch Template Example

A Template defines the fields and sections associated with a type of item. Items in sitecore can be created using three different template types.

·         Data Template:  form the framework around which items are built. They define fields used to control how data is entered and can inherit from other templates to enable reuse.

·         Branch Template: allow you to create a set of items rather than a single item at a time.

·         Command Template: allow insert of items according to logic rather than predefined structures.

Data Template: A data template defines a data type. Sitecore associates a data template with each item. The data template defines the structure of all items associated with that data template. A data template contains a number of data template sections, each of which contains a number of data template fields.

Branch Template: A branch template consists of a branch template definition item, which can contain a single item, a hierarchy of items, or multiple hierarchies of items. When a user invokes a branch template, Sitecore duplicates the item(s) beneath the branch template definition item, including any field values, and then performs token substitution on item names and field values.

Following tokens can be used in field values of each of the items inserted using branch template.

The name entered by the user when inserting the item
The ID of the item
The ID of the parent of the item
The name of the parent of the item
The system date (yyyyMMdd)
The system time (HHmmss)
The date and time (yyyyMMddTHHmmss)

Following example creates a branch template, which can be used to create a “Shopping” item with two folders “Brands” and “Products” and each folder with a respective sample item.

Step 1: Create three templates “Shopping”, “Brand” & “Product” with “Title” & “Description” fields

Step 2: Create a new Branch. Navigate to “sitecore/templates/Branches” , right click and insert “ New Branch”

Step 3: Select “Shopping” template in the “Create a New Branch” branch template wizard

Step 4: Right click on $name and create two new folders “Brands” & “Products”

Step 5: Right click on “Brands” folder and create a sample item using “Brands” template. Then create a sample item using “Products” template under “products” folder.

Step 6: Right click on Home and create a content item from the new branch template.


  1. This is the nice article on
    sitecore please keep Sharing

  2. Nice blog. Really helpful for learning SiteCore and keep update on some more tutorials….. I liked your blog.

  3. This is the exact information I am been searching for, Thanks for sharing the required infos with the clear update and required points. To appreciate this I like to share some useful application testing training in bangalore

  4. Information in this blog is very useful for me, I am very happy to part of this blog
    Sitecore Online Training
    Sitecore Training in Hyderabad