Class TemplateQueryController
The API controller used for building content queries within the template
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ControllerBase
Namespace: Umbraco.Cms.Web.BackOffice.Controllers
Assembly: Umbraco.Web.BackOffice.dll
Syntax
[JsonCamelCaseFormatter]
public class TemplateQueryController : UmbracoAuthorizedJsonController
Constructors
View SourceTemplateQueryController(IVariationContextAccessor, IPublishedContentQuery, ILocalizedTextService, IPublishedValueFallback, IContentTypeService)
Declaration
public TemplateQueryController(IVariationContextAccessor variationContextAccessor, IPublishedContentQuery publishedContentQuery, ILocalizedTextService localizedTextService, IPublishedValueFallback publishedValueFallback, IContentTypeService contentTypeService)
Parameters
| Type | Name | Description |
|---|---|---|
| IVariationContextAccessor | variationContextAccessor | |
| IPublishedContentQuery | publishedContentQuery | |
| ILocalizedTextService | localizedTextService | |
| IPublishedValueFallback | publishedValueFallback | |
| IContentTypeService | contentTypeService |
Methods
View SourceGetAllowedProperties()
Returns a collection of allowed properties.
Declaration
public IEnumerable<PropertyModel> GetAllowedProperties()
Returns
| Type | Description |
|---|---|
| IEnumerable<PropertyModel> |
GetContentTypes()
Gets a list of all content types
Declaration
public IEnumerable<ContentTypeModel> GetContentTypes()
Returns
| Type | Description |
|---|---|
| IEnumerable<ContentTypeModel> |
GetFilterConditions()
Returns a collection of constraint conditions that can be used in the query
Declaration
public IEnumerable<object> GetFilterConditions()
Returns
| Type | Description |
|---|---|
| IEnumerable<System.Object> |
PostTemplateQuery(QueryModel)
Declaration
public QueryResultModel PostTemplateQuery(QueryModel model)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryModel | model |
Returns
| Type | Description |
|---|---|
| QueryResultModel |