Table of Contents

Class TemplateQueryController

Namespace
Umbraco.Cms.Web.BackOffice.Controllers
Assembly
Umbraco.Web.BackOffice.dll

The API controller used for building content queries within the template

[JsonCamelCaseFormatter]
public class TemplateQueryController : UmbracoAuthorizedJsonController
Inheritance
TemplateQueryController
Inherited Members

Constructors

TemplateQueryController(IVariationContextAccessor, IPublishedContentQuery, ILocalizedTextService, IPublishedValueFallback, IContentTypeService)

public TemplateQueryController(IVariationContextAccessor variationContextAccessor, IPublishedContentQuery publishedContentQuery, ILocalizedTextService localizedTextService, IPublishedValueFallback publishedValueFallback, IContentTypeService contentTypeService)

Parameters

variationContextAccessor IVariationContextAccessor
publishedContentQuery IPublishedContentQuery
localizedTextService ILocalizedTextService
publishedValueFallback IPublishedValueFallback
contentTypeService IContentTypeService

Methods

GetAllowedProperties()

Returns a collection of allowed properties.

public IEnumerable<PropertyModel> GetAllowedProperties()

Returns

IEnumerable<PropertyModel>

GetContentTypes()

Gets a list of all content types

public IEnumerable<ContentTypeModel> GetContentTypes()

Returns

IEnumerable<ContentTypeModel>

GetFilterConditions()

Returns a collection of constraint conditions that can be used in the query

public IEnumerable<object> GetFilterConditions()

Returns

IEnumerable<object>

PostTemplateQuery(QueryModel)

public QueryResultModel PostTemplateQuery(QueryModel model)

Parameters

model QueryModel

Returns

QueryResultModel