PageReference type that points to the parent page for this page.
Namespace:
EPiServer.CoreAssembly: EPiServer (in EPiServer.dll) Version: 5.2.375.236
Syntax
| C# |
|---|
public PageReference ParentLink { get; set; } |
Remarks
Parent and childhood is determined by placement in the Web page tree.
Examples
In the following code example ParentLink is used twice. Firstly to make sure it contains a non-empty PageReference and secondly to retrieve the sibling of the current page.
if ( CurrentPage.ParentLink != EPiServer.Core.PageReference.EmptyReference )
{
EPiServer.Core.PageDataCollection siblings = GetChildren( CurrentPage.ParentLink );
}The following code example demonstrates the usage of ParentLink. The example results in the name of the parent page being displayed.
Parent Page Name: <%= GetPage( CurrentPage.ParentLink ).PageName %>