Class HierarchicalPageLoader
Serves as a support class for loading hierarchical page structures. This class is used in Hierarchical controls like PageTreeData deriving classes and PageDataSource classes.
Inheritance
Inherited Members
Namespace: EPiServer.Web.WebControls
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public class HierarchicalPageLoader : IHierarchicalPageDataSource, IPageSourceConstructors
HierarchicalPageLoader()
Declaration
public HierarchicalPageLoader()HierarchicalPageLoader(IContentRepository)
Declaration
public HierarchicalPageLoader(IContentRepository contentRepository)Parameters
| Type | Name | Description | 
|---|---|---|
| IContentRepository | contentRepository | 
Properties
AccessLevel
Gets/sets the page access level for datasource.
Declaration
public AccessLevel AccessLevel { get; set; }Property Value
| Type | Description | 
|---|---|
| AccessLevel | The page access level. | 
EvaluateHasChildren
Gets or sets whether the hierarchical view should preevaluate the existens of child pages or always return true to let the HierarchicalDataBoundControl evaluate it as needed.
Declaration
public bool EvaluateHasChildren { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
GetChildrenCallback
Gets or sets the method used to retreive children for a specific page.
Declaration
public HierarchicalPageLoader.GetChildrenMethod GetChildrenCallback { get; set; }Property Value
| Type | Description | 
|---|---|
| HierarchicalPageLoader.GetChildrenMethod | A GetChildrenMethod instance. | 
Remarks
If GetChildrenCallback is undefined, the GetChildren(PageReference) method of DataFactory is used.
GetPageCallback
Gets or sets the method used for retreiving page data for a specific page.
Declaration
public HierarchicalPageLoader.GetPageMethod GetPageCallback { get; set; }Property Value
| Type | Description | 
|---|---|
| HierarchicalPageLoader.GetPageMethod | A GetPageMethod instance. | 
Remarks
If no callback is provided the GetPage(PageReference) method will be used.
IncludeRootPage
Gets or sets a value indicating whether the root page should be included in the hierarchy or not.
Declaration
public bool IncludeRootPage { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
 | 
InitializeCallback
Gets or sets the method used to initialize the the Loader instance.
Declaration
public HierarchicalPageLoader.InitializeMethod InitializeCallback { get; set; }Property Value
| Type | Description | 
|---|---|
| HierarchicalPageLoader.InitializeMethod | A InitializeMethod instance. | 
PageLink
Gets or sets the root page for a hierarchical view.
Declaration
public PageReference PageLink { get; set; }Property Value
| Type | Description | 
|---|---|
| PageReference | 
Methods
ExecFilters(PageDataCollection)
Declaration
public void ExecFilters(PageDataCollection pages)Parameters
| Type | Name | Description | 
|---|---|---|
| PageDataCollection | pages | The collection of PageData. | 
GetFilteredChildren(PageReference)
Gets the filtered children of a specified page. Used when retreiving data for a hierarchical view.
Declaration
public PageDataCollection GetFilteredChildren(PageReference pageLink)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | pagelink representing the current node in the tree view | 
Returns
| Type | Description | 
|---|---|
| PageDataCollection | A collection of child pages | 
HierarchicalSelect(String)
Performs the selection of pages based on the viewPath parameter.
Declaration
public virtual PageHierarchicalEnumerable HierarchicalSelect(string viewPath)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | viewPath | The hierarchical path of the node to enumerate. | 
Returns
| Type | Description | 
|---|---|
| PageHierarchicalEnumerable | An IHierarchicalEnumerable representing the child structure of the specified path. | 
Remarks
Override this method to implement custom hierarchical behavior.
IsRoot(PageData)
Determines if a PageData instance represents a root in the current hierarchicla view.
Declaration
public virtual bool IsRoot(PageData page)Parameters
| Type | Name | Description | 
|---|---|---|
| PageData | page | The PageData instance to match with. | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if instance is a root node in the hierarchy, otherwise false. | 
Events
Filter
Occurs when child page data has been loaded. Typically you attach an eventhandler to this event in order to exclude part of the result or sort the result.
Declaration
public event FilterEventHandler FilterEvent Type
| Type | Description | 
|---|---|
| FilterEventHandler | 
Explicit Interface Implementations
IPageSource.CurrentPage
Declaration
PageData IPageSource.CurrentPage { get; }Returns
| Type | Description | 
|---|---|
| PageData | 
IPageSource.GetChildren(PageReference)
Declaration
PageDataCollection IPageSource.GetChildren(PageReference pageLink)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | 
Returns
| Type | Description | 
|---|---|
| PageDataCollection | 
IPageSource.GetPage(PageReference)
Declaration
PageData IPageSource.GetPage(PageReference pageLink)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | 
Returns
| Type | Description | 
|---|---|
| PageData | 
