Class PageTree

Control for rendering page tree's, extends PageTreeData with templates.
See also PageTreeData, PageControlBase

Inheritance
System.Object
PageTree
Implements
System.Web.UI.INamingContainer
Namespace: EPiServer.Web.WebControls
Assembly: EPiServer.Web.WebControls.dll
Version: 8.11.0
Syntax
public class PageTree : PageTreeData, INamingContainer
Remarks

Specify at least ItemTemplate to enable rendering, other templates not set will fallback on the most likely substitute If the TopTemplate is set other TopTemplates will fallback to this template insted of the corresponding ItemTemplate.

note

Keep in mind while inherriting that the template fallback behavior can be modified by overriding any of the virtual InstantiateXXXTemplate methods. If you just want to change in which order the different templates will be used you simply call the InstantiateTemplate method providing the template order you want for your rendering as arguments.

Examples

Example usage of PageTree rendering a simple tree of pages.

Constructors

PageTree()

Initializes a new instance of the PageTree class.

Declaration
public PageTree()

Properties

ExpandedItemTemplate

The default template for expanded pages

Declaration
public ITemplate ExpandedItemTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

ExpandedTopTemplate

The default template for expanded top level pages

Declaration
public ITemplate ExpandedTopTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

FooterTemplate

The default template for footer

Declaration
public ITemplate FooterTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate
Remarks

Contained page will be the root page for the tree

HeaderTemplate

The default template for heading

Declaration
public ITemplate HeaderTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate
Remarks

Contained page will be the root page for the tree

IndentTemplate

The template for indent rendering

Declaration
public ITemplate IndentTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

ItemFooterTemplate

Declaration
public ITemplate ItemFooterTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

ItemHeaderTemplate

Declaration
public ITemplate ItemHeaderTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

ItemTemplate

The default template for pages

Declaration
public ITemplate ItemTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

SelectedExpandedItemTemplate

The default template for selected and expanded pages

Declaration
public ITemplate SelectedExpandedItemTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

SelectedExpandedTopTemplate

The default template for selected and expanded top level pages

Declaration
public ITemplate SelectedExpandedTopTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

SelectedItemTemplate

The default template for selected pages

Declaration
public ITemplate SelectedItemTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

SelectedTopTemplate

The default template for selected top level pages

Declaration
public ITemplate SelectedTopTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

TopTemplate

The default template for top level pages

Declaration
public ITemplate TopTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

UnindentTemplate

The template for unindent rendering

Declaration
public ITemplate UnindentTemplate { get; set; }
Property Value
Type Description
System.Web.UI.ITemplate

Methods

CreateChildControls()

Called by the ASP.NET page framework to notify server controls that use composition-based implementation to create any child controls they contain in preparation for posting back or rendering.

Declaration
protected override void CreateChildControls()

InstantiateExpandedItemTemplate(PageTemplateContainer)

Instantiates the expanded item template.

Declaration
protected virtual void InstantiateExpandedItemTemplate(PageTemplateContainer template)
Parameters
Type Name Description
PageTemplateContainer template

The template.

InstantiateExpandedTopTemplate(PageTemplateContainer)

Instantiates the expanded top template.

Declaration
protected virtual void InstantiateExpandedTopTemplate(PageTemplateContainer template)
Parameters
Type Name Description
PageTemplateContainer template

The template.

InstantiateItemTemplate(PageTemplateContainer)

Instantiates the item template.

Declaration
protected virtual void InstantiateItemTemplate(PageTemplateContainer template)
Parameters
Type Name Description
PageTemplateContainer template

The template.

InstantiateSelectedExpandedItemTemplate(PageTemplateContainer)

Instantiates the selected expanded item template.

Declaration
protected virtual void InstantiateSelectedExpandedItemTemplate(PageTemplateContainer template)
Parameters
Type Name Description
PageTemplateContainer template

The template.

InstantiateSelectedExpandedTopTemplate(PageTemplateContainer)

Instantiates the selected expanded top template.

Declaration
protected virtual void InstantiateSelectedExpandedTopTemplate(PageTemplateContainer template)
Parameters
Type Name Description
PageTemplateContainer template

The template.

InstantiateSelectedItemTemplate(PageTemplateContainer)

Instantiates the selected item template.

Declaration
protected virtual void InstantiateSelectedItemTemplate(PageTemplateContainer template)
Parameters
Type Name Description
PageTemplateContainer template

The template.

InstantiateSelectedTopTemplate(PageTemplateContainer)

Instantiates the selected top template.

Declaration
protected virtual void InstantiateSelectedTopTemplate(PageTemplateContainer template)
Parameters
Type Name Description
PageTemplateContainer template

The template.

InstantiateTopTemplate(PageTemplateContainer)

Instantiates the top template.

Declaration
protected virtual void InstantiateTopTemplate(PageTemplateContainer template)
Parameters
Type Name Description
PageTemplateContainer template

The template.

Render(HtmlTextWriter)

Sends server control content to a provided System.Web.UI.HtmlTextWriter object, which writes the content to be rendered on the client.

Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
Type Name Description
System.Web.UI.HtmlTextWriter writer

The System.Web.UI.HtmlTextWriter object that receives the server control content.

Implements

System.Web.UI.INamingContainer