Class RetrieveQueryParametersBase<T>
Base class for query parameters used during retrieval. IContentRetriever
public abstract class RetrieveQueryParametersBase<T> where T : RetrieveQueryParametersBase<T>
Type Parameters
T
- Inheritance
-
objectRetrieveQueryParametersBase<T>
- Derived
- Extension Methods
Properties
ContentQueryActions
Content query actions to be applied to the query parameters.
protected List<Action<ContentQueryParameters>> ContentQueryActions { get; init; }
Property Value
- List<Action<ContentQueryParameters>>
ContentTypesQueryActions
Content type query actions to be applied to the query parameters.
protected List<Action<ContentTypesQueryParameters>> ContentTypesQueryActions { get; init; }
Property Value
- List<Action<ContentTypesQueryParameters>>
Default
Returns default empty configuration action of T.
public static Action<T> Default { get; }
Property Value
- Action<T>
Methods
Columns(params QueryColumn[])
Configures the columns to be selected.
public T Columns(params QueryColumn[] columns)
Parameters
columnsQueryColumn[]Columns to be selected represented as QueryColumn.
Returns
- T
Returns
Tinstance to chain further configuration.
Columns(params string[])
Configures the columns to be selected.
public T Columns(params string[] columnNames)
Parameters
columnNamesstring[]Names of columns to be selected.
Returns
- T
Returns
Tinstance to chain further configuration.
SetUrlLanguageBehavior(UrlLanguageBehavior)
Defines the behavior for URL paths of web pages in fallback languages.
public T SetUrlLanguageBehavior(UrlLanguageBehavior urlLanguageBehavior)
Parameters
urlLanguageBehaviorUrlLanguageBehaviorURL language behavior.
Returns
- T
Returns
Tinstance to chain further configuration.
Remarks
By default behavior is set to UseRequestedLanguage in Kentico.Content.Web.Mvc.ContentRetriever
WithAiProvenance()
Configures query to include the AI provenance of the retrieved content items' fields.
public T WithAiProvenance()
Returns
- T
Returns
Tinstance to chain further configuration.
Remarks
Use GetAiProvenanceOrigin(IContentItemFieldsSource, string) on the retrieved models to read the AI provenance origin of a field. Without this configuration, every field reports None.
WithLinkedItems(Action<LinkedItemsOptions>)
Configures query to include linked content items recursively up to the specified LinkedItemsMaxLevel.
public T WithLinkedItems(Action<LinkedItemsOptions> configureOptionsAction)
Parameters
configureOptionsActionAction<LinkedItemsOptions>Action to configure specific options for linked items. See LinkedItemsOptions for possible options.
Returns
- T
Returns this
Tinstance to chain further configuration.
Remarks
Use the GetLinkedItems(string) method during result mapping (GetResult<TModel>(ContentItemQueryBuilder, Func<IContentQueryDataContainer, TModel>, ContentQueryExecutionOptions, CancellationToken) to access the linked content items of an item.
By default Kentico.Content.Web.Mvc.ContentRetriever includes web page data for linked items. IncludeWebPageData(bool)