Class Template
Represents a Template file.
Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
[Serializable]
[DataContract(IsReference = true)]
public class Template : File, ITemplate, IFile, IAggregateRoot, IDeletableEntity, IEntity, IDeepCloneable, IRememberBeingDirty, ICanBeDirty
Constructors
Template(String, String)
Declaration
public Template(string name, string alias)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.String |
alias |
|
Template(String, String, String)
Declaration
[Obsolete("This constructor should not be used, file path is determined by alias, setting the path here will have no affect")]
public Template(string path, string name, string alias)
Parameters
Type |
Name |
Description |
System.String |
path |
|
System.String |
name |
|
System.String |
alias |
|
Properties
Alias
Declaration
[DataMember]
public string Alias { get; set; }
Property Value
Type |
Description |
System.String |
|
IsMasterTemplate
Returns true if the template is used as a layout for other templates (i.e. it has 'children')
Declaration
public bool IsMasterTemplate { get; }
Property Value
Type |
Description |
System.Boolean |
|
MasterTemplateAlias
Declaration
public string MasterTemplateAlias { get; set; }
Property Value
Type |
Description |
System.String |
|
MasterTemplateId
Declaration
[DataMember]
public Lazy<int> MasterTemplateId { get; set; }
Property Value
Type |
Description |
System.Lazy<System.Int32> |
|
Name
Declaration
[DataMember]
public string Name { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
DeepCloneNameAndAlias(File)
Declaration
protected override void DeepCloneNameAndAlias(File clone)
Parameters
Type |
Name |
Description |
File |
clone |
|
GetTypeOfRenderingEngine()
Declaration
[Obsolete("This is no longer used and will be removed from the codebase in future versions, use the IFileSystem DetermineRenderingEngine method instead")]
public RenderingEngine GetTypeOfRenderingEngine()
Returns
SetMasterTemplate(ITemplate)
Declaration
public void SetMasterTemplate(ITemplate masterTemplate)
Parameters
Type |
Name |
Description |
ITemplate |
masterTemplate |
|