Class SearchPages
Provides different ways of searching for pages.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 8.11.0Syntax
[ServiceConfiguration(ServiceType = typeof(SearchPages))]
public class SearchPages : IPageCriteriaQueryServiceConstructors
SearchPages()
Initializes a new instance of the SearchPages class.
Declaration
public SearchPages()SearchPages(IContentRepository)
Initializes a new instance of the SearchPages class.
Declaration
public SearchPages(IContentRepository contentRepository)Parameters
| Type | Name | Description | 
|---|---|---|
| IContentRepository | contentRepository | The page repository. | 
Remarks
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
SearchPages(IContentRepository, ServiceAccessor<ContentListDB>, ServiceAccessor<PropertySearchDB>)
Initializes a new instance of the SearchPages class.
Declaration
public SearchPages(IContentRepository contentRepository, ServiceAccessor<ContentListDB> contentListDB, ServiceAccessor<PropertySearchDB> propertySearchDB)Parameters
| Type | Name | Description | 
|---|---|---|
| IContentRepository | contentRepository | |
| ServiceAccessor<ContentListDB> | contentListDB | |
| ServiceAccessor<PropertySearchDB> | propertySearchDB | 
Remarks
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
Methods
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  | 
| 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(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, AccessLevel)
Finds the pages that fulfill the criterias.
Declaration
[Obsolete("requiredAccss parameter is ignored, use another overload")]
public PageDataCollection FindPagesWithCriteria(PageReference pageLink, PropertyCriteriaCollection criterias, AccessLevel requiredAccess)Parameters
| Type | Name | Description | 
|---|---|---|
| PageReference | pageLink | Search below this page. | 
| PropertyCriteriaCollection | criterias | The criterias to match. | 
| AccessLevel | requiredAccess | The required access level for pages to be included in the result set. | 
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.
