Table of Contents

Class RetrievePagesQueryParametersBase<T>

Namespace
Kentico.Content.Web.Mvc
Assembly
Kentico.Content.Web.Mvc.dll

Base class for query parameters used during pages retrieval. IContentRetriever

public abstract class RetrievePagesQueryParametersBase<T> : RetrieveQueryParametersBase<T> where T : RetrievePagesQueryParametersBase<T>

Type Parameters

T
Inheritance
object
RetrievePagesQueryParametersBase<T>
Derived
Inherited Members
Extension Methods

Methods

IncludeTotalCount()

Configures query to include total count of results when the query has Offset(int, int) configured.

public T IncludeTotalCount()

Returns

T

Returns T instance to chain further configuration.

LinkedFrom(string, string, IEnumerable<IContentItemIdentifier>)

Retrieves content items of the specified contentTypeName linked from referenceFieldName.

public T LinkedFrom(string contentTypeName, string referenceFieldName, IEnumerable<IContentItemIdentifier> items)

Parameters

contentTypeName string

Content type name referencing content items to be retrieved.

referenceFieldName string

Name of the field within contentTypeName referencing content items to be retrieved.

items IEnumerable<IContentItemIdentifier>

Collection of IContentItemIdentifier of items for which to retrieve the linked items.

Returns

T

Returns this T instance to chain further configuration.

Remarks

LinkedFromSchemaField(string, IEnumerable<IContentItemIdentifier>)

Retrieves content items linked from referenceSchemaFieldName.

public T LinkedFromSchemaField(string referenceSchemaFieldName, IEnumerable<IContentItemIdentifier> items)

Parameters

referenceSchemaFieldName string

Name of the schema field referencing content items to be retrieved.

items IEnumerable<IContentItemIdentifier>

Collection of IContentItemIdentifier of items for which to retrieve the linked items.

Returns

T

Returns this T instance to chain further configuration.

Remarks

LinkingSchemaField(string, IEnumerable<int>)

Configure query to retrieve linked items which reference in the referenceSchemaFieldName.

public T LinkingSchemaField(string referenceSchemaFieldName, IEnumerable<int> items)

Parameters

referenceSchemaFieldName string

Name of the schema field referencing content items to be retrieved.

items IEnumerable<int>

Identifiers of items which are linked from the retrieved items.

Returns

T

Returns this T instance to chain further configuration.

Remarks

Simultaneous call with LinkedFrom(string, string, IEnumerable<IContentItemIdentifier>) or LinkedFromSchemaField(string, IEnumerable<IContentItemIdentifier>) is not supported. Multiple calls of this method are not supported.

Offset(int, int)

Configures the offset and number of records to be returned.

public T Offset(int offset, int fetch)

Parameters

offset int

Index of the first record to return.

fetch int

Number of records to return.

Returns

T

Returns T instance to chain further configuration.

Remarks

Requires configured ordering via OrderBy(params OrderByColumn[]) method - it guarantees consistently ordered results. Cannot be combined with TopN(int). Using Offset(int, int) is recommended to implement a query paging solution.

See Also

OrderBy(params OrderByColumn[])

Configures one or multiple columns to perform order defined by arguments.

public T OrderBy(params OrderByColumn[] columns)

Parameters

columns OrderByColumn[]

Columns to perform order represented as OrderByColumn.

Returns

T

Returns T instance to chain further configuration.

See Also
Asc(string)
Desc(string)

OrderBy(params string[])

Configures one or multiple columns to perform ascending order.

public T OrderBy(params string[] columnNames)

Parameters

columnNames string[]

Names of columns to perform order.

Returns

T

Returns T instance to chain further configuration.

TopN(int)

Configures number of records to be returned.

public T TopN(int topN)

Parameters

topN int

Number of records to return.

Returns

T

Returns T instance to chain further configuration.

Remarks

Cannot be combined with Offset(int, int). Use Offset(int, int) instead to implement a query paging solution.

UrlPathColumns()

Configures URL path columns to be selected.

public T UrlPathColumns()

Returns

T

Returns this T instance to chain further configuration.

Remarks

In case you set the parameter IncludeUrlPath to false, calling this method is not supported.

The method is used to further parametrize the content query by configuring required columns (WebPageItemID, WebPageItemTreePath, WebPageUrlPath and ContentItemCommonDataContentLanguageID) needed to retrieve the web page URL using Retrieve(int, string, bool, CancellationToken).

Where(Action<WhereParameters>)

Configures query to extract only those records that fulfill a specified condition.

public T Where(Action<WhereParameters> configureWhere)

Parameters

configureWhere Action<WhereParameters>

Action configuring the where condition tree using the WhereParameters.

Returns

T

Returns T instance to chain further configuration.