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

Class SearchPages

Provides different ways of searching for pages.

Inheritance
System.Object
SearchPages
Namespace: EPiServer.DataAbstraction.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
[ServiceConfiguration(ServiceType = null)]
public class SearchPages : Object, IPageCriteriaQueryable

Constructors

SearchPages(IContentRepository, ServiceAccessor<ContentListDB>, ServiceAccessor<PropertySearchDB>, IContentAccessEvaluator, IPrincipalAccessor)

Initializes a new instance of the SearchPages class.

Declaration
public SearchPages(IContentRepository contentRepository, ServiceAccessor<ContentListDB> contentListDB, ServiceAccessor<PropertySearchDB> propertySearchDB, IContentAccessEvaluator contentAccessEvaluator, IPrincipalAccessor principalAccessor)
Parameters
Type Name Description
IContentRepository contentRepository
ServiceAccessor<ContentListDB> contentListDB
ServiceAccessor<PropertySearchDB> propertySearchDB
IContentAccessEvaluator contentAccessEvaluator
IPrincipalAccessor principalAccessor
Remarks

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Methods

FindAllPagesWithCriteria(ContentReference, PropertyCriteriaCollection, String, ILanguageSelector)

Finds the pages that fulfill the criterias.

Declaration
public PageDataCollection FindAllPagesWithCriteria(ContentReference contentLink, PropertyCriteriaCollection criterias, string languageBranch, ILanguageSelector selector)
Parameters
Type Name Description
ContentReference contentLink

Search below this content.

PropertyCriteriaCollection criterias

The criterias to match.

System.String languageBranch

Only search for pages on specific language branch.

ILanguageSelector selector

Select how to handle language fallback if needed.

Returns
Type Description
PageDataCollection

A collection of pages that fulfil the criterias.

Remarks

The collection is filtered by access level and the user should have at least read rights for the published pages.

FindAllPagesWithCriteria(PageReference, PropertyCriteriaCollection, String, ILanguageSelector)

Finds all pages with criteria.

Declaration
public PageDataCollection FindAllPagesWithCriteria(PageReference pageLink, PropertyCriteriaCollection criterias, string languageBranch, ILanguageSelector selector)
Parameters
Type Name Description
PageReference pageLink

The page link.

PropertyCriteriaCollection criterias

The criterias.

System.String languageBranch

The language branch.

ILanguageSelector selector

The selector.

Returns
Type Description
PageDataCollection

A collection of pages that fulfil the criterias.

FindByName(String)

Finds the first page that matches the page name.

Declaration
public PageReference FindByName(string pageName)
Parameters
Type Name Description
System.String pageName

Name of the page.

Returns
Type Description
PageReference

A PageReference to the first matching page.

FindByName(String, String)

Finds the first page that matches the page name.

Declaration
public PageReference FindByName(string pageName, string languageBranch)
Parameters
Type Name Description
System.String pageName

Name of the page.

System.String languageBranch

Restrict searching to pages in this language branch.

Returns
Type Description
PageReference

A PageReference to the first matching page.

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".

FindPages(PageReference, String)

Finds pages of a specific language branch.

Declaration
public PageDataCollection FindPages(PageReference pageLink, string languageBranch)
Parameters
Type Name Description
PageReference pageLink

A page link that specifies the parent page. If pageLink is null all pages regardless of parent will be considered.

System.String languageBranch

The language branch.

Returns
Type Description
PageDataCollection

A collection of pages.

FindPages(String)

Finds all pages of a specific language branch.

Declaration
public PageDataCollection FindPages(string languageBranch)
Parameters
Type Name Description
System.String languageBranch

The language branch.

Returns
Type Description
PageDataCollection

A collection of pages.

FindPagesWithCriteria(ContentReference, PropertyCriteriaCollection, String, ILanguageSelector)

Finds the pages that fulfill the criterias.

Declaration
public PageDataCollection FindPagesWithCriteria(ContentReference contentLink, PropertyCriteriaCollection criterias, string languageBranch, ILanguageSelector selector)
Parameters
Type Name Description
ContentReference contentLink

Search below this content.

PropertyCriteriaCollection criterias

The criterias to match.

System.String languageBranch

Only search for pages on specific language branch.

ILanguageSelector selector

Select how to handle language fallback if needed.

Returns
Type Description
PageDataCollection

A collection of pages that fulfil the criterias.

Remarks

The collection is filtered by access level and the user should have at least read rights for the published pages.

FindPagesWithCriteria(PageReference, PropertyCriteriaCollection)

Finds the pages that fulfill the criterias.

Declaration
public PageDataCollection FindPagesWithCriteria(PageReference pageLink, PropertyCriteriaCollection criterias)
Parameters
Type Name Description
PageReference pageLink

Search below this page.

PropertyCriteriaCollection criterias

The criterias to match.

Returns
Type Description
PageDataCollection

A collection of pages that fulfil the criterias.

FindPagesWithCriteria(PageReference, PropertyCriteriaCollection, String)

Finds the pages that fulfill the criterias.

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

Search below this page.

PropertyCriteriaCollection criterias

The criterias to match.

System.String languageBranch

Only search for pages on specific language branch.

Returns
Type Description
PageDataCollection

A collection of pages that fulfil the criterias.

FindPagesWithCriteria(PageReference, PropertyCriteriaCollection, String, ILanguageSelector)

Finds the pages that fulfill the criterias.

Declaration
public PageDataCollection FindPagesWithCriteria(PageReference pageLink, PropertyCriteriaCollection criterias, string languageBranch, ILanguageSelector selector)
Parameters
Type Name Description
PageReference pageLink

Search below this page.

PropertyCriteriaCollection criterias

The criterias to match.

System.String languageBranch

Only search for pages on specific language branch.

ILanguageSelector selector

Select how to handle language fallback if needed.

Returns
Type Description
PageDataCollection

A collection of pages that fulfil the criterias.

Remarks

The collection is filtered by access level and the user should have at least read rights for the published pages.

Implements

Extension Methods