November Happy Hour will be moved to Thursday December 5th.

Class PageCriteriaQueryServiceExtensions

Extends IPageCriteriaQueryService with convinent methods.

Inheritance
System.Object
PageCriteriaQueryServiceExtensions
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: 9.12.2
Syntax
public static class PageCriteriaQueryServiceExtensions

Methods

FindPagesWithCriteria(IPageCriteriaQueryService, PageReference, PropertyCriteriaCollection)

Search for pages that fulfil a specific criterias

Declaration
public static PageDataCollection FindPagesWithCriteria(this IPageCriteriaQueryService queryService, PageReference pageLink, PropertyCriteriaCollection criterias)
Parameters
Type Name Description
IPageCriteriaQueryService queryService

The IPageCriteriaQueryService instance to extend

PageReference pageLink

The root page for which the search will be performed

PropertyCriteriaCollection criterias

The criterias for pages

Returns
Type Description
PageDataCollection

A collection of pages that fulfil the criteras, will be empty if no match is found.

FindPagesWithCriteria(IPageCriteriaQueryService, PageReference, PropertyCriteriaCollection, String)

Search for pages that fulfil a specific criterias

Declaration
public static PageDataCollection FindPagesWithCriteria(this IPageCriteriaQueryService queryService, PageReference pageLink, PropertyCriteriaCollection criterias, string languageBranch)
Parameters
Type Name Description
IPageCriteriaQueryService queryService

The IPageCriteriaQueryService instance to extend

PageReference pageLink

The root page for which the search will be performed

PropertyCriteriaCollection criterias

The criterias for pages

System.String languageBranch

Only search for pages on specific language branch

Returns
Type Description
PageDataCollection

A collection of pages that fulfil the criteras, will be empty if no match is found.

FindPagesWithName(IPageCriteriaQueryService, PageReference, String, String)

Finds all pages that matches the page name in the provided language.

Declaration
public static PageDataCollection FindPagesWithName(this IPageCriteriaQueryService queryService, PageReference pageLink, string pageName, string languageBranch)
Parameters
Type Name Description
IPageCriteriaQueryService queryService

The service that is being extended

PageReference pageLink

The root page for which the search will be performed

System.String pageName

Name of the page.

System.String languageBranch

Restrict searching to pages in this language branch.

Returns
Type Description
PageDataCollection
Remarks

The page name is matched with starting and trailing wildcards, i e searching for pageName "abc" will for example match pages named "abc", "123abc456" or "abc1234".