Try our conversational search powered by Generative AI!

Class PageDataExtensions

Inheritance
System.Object
PageDataExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 7.19.2
Syntax
public static class PageDataExtensions

Methods

GetContentDirectory(IContent, Boolean)

Gets the content directory.

Declaration
public static UnifiedDirectory GetContentDirectory(this IContent content, bool createIfNotExist)
Parameters
Type Name Description
IContent content

The content.

System.Boolean createIfNotExist

if set to true [create if not exist].

Returns
Type Description
UnifiedDirectory

GetPageDirectory(PageData, Boolean)

Gets the UnifiedDirectory for a page.

Declaration
public static UnifiedDirectory GetPageDirectory(this PageData page, bool createIfNotExist)
Parameters
Type Name Description
PageData page

The page

System.Boolean createIfNotExist

if set to true directory is created if it not exist

Returns
Type Description
UnifiedDirectory

The directory for the page (or null if createIfNotExist is false and directory does not exist)

GetPageLanguage(PageData, String)

Get a page in the requested language.

Declaration
public static PageData GetPageLanguage(this PageData page, string languageBranchId)
Parameters
Type Name Description
PageData page

The page

System.String languageBranchId

The language branch id.

Returns
Type Description
PageData

PageData in requested language or null if a page on that language does not exist

HasTemplate(PageData)

Determines whether the specified content data has template.

Declaration
public static bool HasTemplate(this PageData pageData)
Parameters
Type Name Description
PageData pageData

The page data.

Returns
Type Description
System.Boolean

true if the specified content data has template; otherwise, false.

IsVisibleOnSite(PageData)

Determines whether the specified content data is visible on site.

Declaration
public static bool IsVisibleOnSite(this PageData pageData)
Parameters
Type Name Description
PageData pageData

The page data.

Returns
Type Description
System.Boolean

true if the specified content data is visible on site; otherwise, false.