diff --git a/src/Umbraco.Web/Routing/PublishedContentRequest.cs b/src/Umbraco.Web/Routing/PublishedContentRequest.cs index b3c5ac3db9..73e004faae 100644 --- a/src/Umbraco.Web/Routing/PublishedContentRequest.cs +++ b/src/Umbraco.Web/Routing/PublishedContentRequest.cs @@ -235,7 +235,7 @@ namespace Umbraco.Web.Routing /// The alias of the template. /// A value indicating whether a valid template with the specified alias was found. /// - /// Successfully setting the template resets RenderingEngine to Unknown. + /// Successfully setting the template does refresh RenderingEngine. /// If setting the template fails, then the previous template (if any) remains in place. /// public bool TrySetTemplate(string alias) @@ -259,6 +259,17 @@ namespace Umbraco.Web.Routing return true; } + /// + /// Sets the template to use to display the requested content. + /// + /// The template. + /// Setting the template does refresh RenderingEngine. + public void SetTemplate(ITemplate template) + { + EnsureWriteable(); + TemplateModel = template; + } + /// /// Gets a value indicating whether the content request has a template. ///