Type PageDataExtensions
Namespace Geta.EPi.Extensions
Extension methods for PageData
Methods
Public static methods
PageDataCollection GetChildren(this PageData parentPage)
Returns all child pages of PageData type for provided parent page.
Parameters
-
PageData
parentPage - Parent page of PageData type for which to return children.
Returns
-
PageDataCollection
- Returns PageDataCollection of child pages.
IEnumerable<T> GetChildren<T>(this PageData parentPage)
Returns all child pages of for provided parent page.
Parameters
-
PageData
parentPage - Parent page of PageData type for which to return children.
Returns
-
IEnumerable<T>
- Returns sequence of child pages of for provided parent page.
IEnumerable<PageData> GetDescendants(this PageData pageData, int levels)
Returns all descendants of PageData type for provided page and level deep.
Parameters
-
PageData
pageData - The page for which to find descendants.
-
int
levels - Level of how deep to look for descendants in page hiararchy.
Returns
-
IEnumerable<PageData>
- Returns sequence of PageData of descendants for provided page.
IEnumerable<T> GetDescendants<T>(this PageData pageData, int levels)
Returns all descendants of type for provided page and level deep.
Parameters
-
PageData
pageData - The page for which to find descendants.
-
int
levels - Level of how deep to look for descendants in page hiararchy.
Returns
-
IEnumerable<T>
- Returns sequence of PageData of descendants for provided page.
string GetFriendlyUrl(this PageData page, bool includeHost)
Returns friendly URL for provided page.
Parameters
-
PageData
page - Page for which to create friendly url.
-
bool
includeHost - Mark if include host name in the url.
Returns
-
string
- String representation of URL for provided page.
PageData GetParent(this PageData page)
Returns parent page of provided page.
Parameters
-
PageData
page - The page for which to find parent page.
Returns
-
PageData
- Returns instance of parent page of PageData type or null if parent page not found./>
IEnumerable<PageData> GetSiblings(this PageData currentPage, bool excludeSelf)
Returns all siblings of PageData type of provided page.
Parameters
-
PageData
currentPage - Page for which to find siblings.
-
bool
excludeSelf - Mark if exclude itself from sibling sequence.
Returns
-
IEnumerable<PageData>
- Sequence of siblings of provided page.
IEnumerable<T> GetSiblings<T>(this PageData currentPage, bool excludeSelf)
Returns all siblings of type of provided page.
Parameters
-
PageData
currentPage - Page for which to find siblings.
-
bool
excludeSelf - Mark if exclude itself from sibling sequence.
Returns
-
IEnumerable<T>
- Sequence of siblings of provided page.
bool IsEqualTo(this PageData page1, PageData page2)
Compares two pages by reference or by WorkID.
Parameters
-
PageData
page1 - First page to compare.
-
PageData
page2 - Second page to compare.
Returns
-
bool
- true if first page and second page references are equals or page content link WorkID equals otherwise returns false.
PageDataCollection ToPageDataCollection(this IEnumerable<PageData> pages)
Converts sequence of PageData to PageDataCollection.
Parameters
-
IEnumerable<PageData>
pages - Source sequence of PageData to convert.
Returns
-
PageDataCollection
- Instance of PageDataCollection from source sequence.