C# Class Alloy.Business.Rendering.TemplateCoordinator

Inheritance: IViewTemplateModelRegistrator
Datei anzeigen Open project: episerver/EPiTranslateFlowDemo

Public Methods

Method Description
OnTemplateResolved ( object sender, TemplateResolverEventArgs args ) : void
Register ( TemplateModelCollection viewTemplateModelRegistrator ) : void

Registers renderers/templates which are not automatically discovered, i.e. partial views whose names does not match a content type's name.

Using only partial views instead of controllers for blocks and page partials has performance benefits as they will only require calls to RenderPartial instead of RenderAction for controllers. Registering partial views as templates this way also enables specifying tags and that a template supports all types inheriting from the content type/model type.

Private Methods

Method Description
BlockPath ( string fileName ) : string
PagePartialPath ( string fileName ) : string

Method Details

OnTemplateResolved() public static method

public static OnTemplateResolved ( object sender, TemplateResolverEventArgs args ) : void
sender object
args TemplateResolverEventArgs
return void

Register() public method

Registers renderers/templates which are not automatically discovered, i.e. partial views whose names does not match a content type's name.
Using only partial views instead of controllers for blocks and page partials has performance benefits as they will only require calls to RenderPartial instead of RenderAction for controllers. Registering partial views as templates this way also enables specifying tags and that a template supports all types inheriting from the content type/model type.
public Register ( TemplateModelCollection viewTemplateModelRegistrator ) : void
viewTemplateModelRegistrator TemplateModelCollection
return void