Interface ITemplateRepository
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public interface ITemplateRepository : IRepositoryQueryable<int, ITemplate>, IRepository<int, ITemplate>, IReadRepository<int, ITemplate>, IRepository, IDisposable
Methods
DetermineTemplateRenderingEngine(ITemplate)
This checks what the default rendering engine is set in config but then also ensures that there isn't already
a template that exists in the opposite rendering engine's template folder, then returns the appropriate
rendering engine to use.
Declaration
RenderingEngine DetermineTemplateRenderingEngine(ITemplate template)
Parameters
Returns
FindTemplateInTree(TemplateNode, String)
Given a template node in a tree, this will find the template node with the given alias if it is found in the hierarchy, otherwise null
Declaration
[Obsolete("Use GetDescendants instead")]
TemplateNode FindTemplateInTree(TemplateNode anyNode, string alias)
Parameters
Type |
Name |
Description |
TemplateNode |
anyNode |
|
System.String |
alias |
|
Returns
Get(String)
Declaration
ITemplate Get(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
Returns
GetAll(String[])
Declaration
IEnumerable<ITemplate> GetAll(params string[] aliases)
Parameters
Type |
Name |
Description |
System.String[] |
aliases |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ITemplate> |
|
GetChildren(Int32)
Declaration
IEnumerable<ITemplate> GetChildren(int masterTemplateId)
Parameters
Type |
Name |
Description |
System.Int32 |
masterTemplateId |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ITemplate> |
|
GetChildren(String)
Declaration
IEnumerable<ITemplate> GetChildren(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ITemplate> |
|
GetDescendants(Int32)
Declaration
IEnumerable<ITemplate> GetDescendants(int masterTemplateId)
Parameters
Type |
Name |
Description |
System.Int32 |
masterTemplateId |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ITemplate> |
|
GetDescendants(String)
Declaration
IEnumerable<ITemplate> GetDescendants(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<ITemplate> |
|
GetFileContentStream(String)
Gets the content of a template as a stream.
Declaration
Stream GetFileContentStream(string filepath)
Parameters
Type |
Name |
Description |
System.String |
filepath |
The filesystem path to the template.
|
Returns
Type |
Description |
System.IO.Stream |
The content of the template.
|
GetFileSize(String)
Declaration
long GetFileSize(string filepath)
Parameters
Type |
Name |
Description |
System.String |
filepath |
|
Returns
Type |
Description |
System.Int64 |
|
GetTemplateNode(String)
Returns a template as a template node which can be traversed (parent, children)
Declaration
[Obsolete("Use GetDescendants instead")]
TemplateNode GetTemplateNode(string alias)
Parameters
Type |
Name |
Description |
System.String |
alias |
|
Returns
SetFileContent(String, Stream)
Sets the content of a template.
Declaration
void SetFileContent(string filepath, Stream content)
Parameters
Type |
Name |
Description |
System.String |
filepath |
The filesystem path to the template.
|
System.IO.Stream |
content |
The content of the template.
|
ValidateTemplate(ITemplate)
Declaration
bool ValidateTemplate(ITemplate template)
Parameters
Returns
Type |
Description |
System.Boolean |
True if Script is valid, otherwise false
|