diff --git a/src/Umbraco.Core/Services/FileService.cs b/src/Umbraco.Core/Services/FileService.cs index c912793e05..e2f946ffee 100644 --- a/src/Umbraco.Core/Services/FileService.cs +++ b/src/Umbraco.Core/Services/FileService.cs @@ -233,6 +233,33 @@ namespace Umbraco.Core.Services } } + /// + /// Returns a template as a template node which can be traversed (parent, children) + /// + /// + /// + public TemplateNode GetTemplateNode(string alias) + { + using (var repository = _repositoryFactory.CreateTemplateRepository(_dataUowProvider.GetUnitOfWork())) + { + return repository.GetTemplateNode(alias); + } + } + + /// + /// 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 + /// + /// + /// + /// + public TemplateNode FindTemplateInTree(TemplateNode anyNode, string alias) + { + using (var repository = _repositoryFactory.CreateTemplateRepository(_dataUowProvider.GetUnitOfWork())) + { + return repository.FindTemplateInTree(anyNode, alias); + } + } + /// /// Saves a /// diff --git a/src/Umbraco.Core/Services/IFileService.cs b/src/Umbraco.Core/Services/IFileService.cs index baf2126b20..2e1e2eef49 100644 --- a/src/Umbraco.Core/Services/IFileService.cs +++ b/src/Umbraco.Core/Services/IFileService.cs @@ -96,6 +96,21 @@ namespace Umbraco.Core.Services /// A object ITemplate GetTemplate(int id); + /// + /// Returns a template as a template node which can be traversed (parent, children) + /// + /// + /// + TemplateNode GetTemplateNode(string alias); + + /// + /// 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 + /// + /// + /// + /// + TemplateNode FindTemplateInTree(TemplateNode anyNode, string alias); + /// /// Saves a ///