Class PageCriteriaQueryServiceExtensions
Extends IPageCriteriaQueryService with convinent methods.
Inheritance
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public static class PageCriteriaQueryServiceExtensions : Object
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".