Interface IPageSource
Interface for providers of Page
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public interface IPageSource
Properties
CurrentPage
Gets the currently loaded Page
Declaration
PageData CurrentPage { get; }
Property Value
Type | Description |
---|---|
Page |
Returns information about the currently loaded page, or a page in a collection when used inside a control. |
Remarks
The implementation of CurrentPage
is strictly up to the implementing class.
Some of the templated Web controls implement IPageCurrentPage
will typically refer to the current page being iterated in a collection or an array.
Another implementor is the PageCurrentPage
in the context of Page
CurrentPage
may be null on sources that aren't connected through PageBase
.
Examples
The following code example demonstrates the usage of CurrentPage
.
Response.Write(CurrentPage.PageName);
Methods
GetChildren(PageReference)
Retrieve a Page
Declaration
PageDataCollection GetChildren(PageReference pageLink)
Parameters
Type | Name | Description |
---|---|---|
Page |
pageLink | Reference to parent page |
Returns
Type | Description |
---|---|
Page |
Returns a collection of pages directly below the page referenced by
the Page |
Examples
The following code example demonstrates the usage of GetChildren.
GetPage(PageReference)
Retrieves a Page
Declaration
PageData GetPage(PageReference pageLink)
Parameters
Type | Name | Description |
---|---|---|
Page |
pageLink | Reference to the page being retrieved |
Returns
Type | Description |
---|---|
Page |
PageData object requested |
Examples
The following code example demonstrates how to get a start page.
The following code example demonstrates how to get a page by ID.