Sitecore 5.0 API

Item.Masters Property

Gets a list of masters that are allowed to be created under this item.

[Visual Basic]
Public ReadOnly Property Masters As MasterItem()
[C#]
public MasterItem[] Masters {get;}

Remarks

A master is an instance of a template much like an item. When an item is created from a master, the master is copied into the new item which receives all the field values from the master. A master may contain subitems that are created whenever an item is created from a master.

Example

The following example retrieves the master item. This can also be done by using the Master property.

{{
public MasterItem GetMaster(Item item) {
  MasterItem result = item.Database.Masters[item.MasterID];
  return result;
}
}}

See Also

Item Class | Sitecore.Data.Items Namespace