Class TemplateModelMerger
Handles merges between ContentType and registered renderers from TemplateModelRepository
Inheritance
Inherited Members
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 9.12.2Syntax
[Obsolete("Templates are no longer merged against the ContentType, defaults are detected at runtime and can be overridden by setting values in admin")]
public class TemplateModelMerger
Constructors
TemplateModelMerger(TemplateModelRepository, TemplateModelSelector)
Initializes a new instance of the TemplateModelMerger class.
Declaration
public TemplateModelMerger(TemplateModelRepository templateModelRepository, TemplateModelSelector modelSelector)
Parameters
Type | Name | Description |
---|---|---|
TemplateModelRepository | templateModelRepository | The template model repository. |
TemplateModelSelector | modelSelector | The model selector. |
Methods
IsInSynch(ContentType)
Determines whether a ContentType is in synch with the settings for the type in TemplateModelRepository.
Declaration
public virtual bool IsInSynch(ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
ContentType | contentType | Type of the content. |
Returns
Type | Description |
---|---|
System.Boolean |
|
MergeContentTypeRenderer(ContentType, IEnumerable<TemplateModel>)
Merges default renderers from the templates
collection to the contentType
as needed.
Declaration
protected virtual void MergeContentTypeRenderer(ContentType contentType, IEnumerable<TemplateModel> templates)
Parameters
Type | Name | Description |
---|---|---|
ContentType | contentType | The ContentType to merge to. |
System.Collections.Generic.IEnumerable<TemplateModel> | templates | The templates that support the BlockType. |
MergePageTypeRenderer(PageType, IEnumerable<TemplateModel>)
Merges default renderers from the templates
collection to the pageType
as needed.
Declaration
protected virtual void MergePageTypeRenderer(PageType pageType, IEnumerable<TemplateModel> templates)
Parameters
Type | Name | Description |
---|---|---|
PageType | pageType | The PageType to merge to. |
System.Collections.Generic.IEnumerable<TemplateModel> | templates | The templates that support the PageType. |
MergeRenderer(ContentType)
Merges supported renderers from the TemplateModelRepository to the ContentType
Declaration
public virtual void MergeRenderer(ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
ContentType | contentType | Type of the content. |
RemoveContentTypeRenderer(ContentType, IEnumerable<TemplateModel>)
Removes the DefaultMvcController and DefaultWebFormTemplate values from contentType
if they correspond to the default renderers in templates
Declaration
protected virtual void RemoveContentTypeRenderer(ContentType contentType, IEnumerable<TemplateModel> templates)
Parameters
Type | Name | Description |
---|---|---|
ContentType | contentType | The ContentType to (possibly) remove values from. |
System.Collections.Generic.IEnumerable<TemplateModel> | templates | The templates that support the ContentType. |
RemovePageTypeRenderer(PageType, IEnumerable<TemplateModel>)
Removes the DefaultMvcController and DefaultWebFormTemplate values from pageType
if they correspond to the default renderer in templates
Declaration
protected virtual void RemovePageTypeRenderer(PageType pageType, IEnumerable<TemplateModel> templates)
Parameters
Type | Name | Description |
---|---|---|
PageType | pageType | The PageType to (possibly) remove values from. |
System.Collections.Generic.IEnumerable<TemplateModel> | templates | The templates that support the PageType. |
RemoveRenderer(ContentType)
Remove entries from ContentType that are the same settings as registered for the type in TemplateModelRepository
Declaration
public virtual void RemoveRenderer(ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
ContentType | contentType | Type of the content. |