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 |
---|---|---|
IVariation |
variationContextAccessor | |
IPublished |
publishedContentQuery | |
ILocalized |
localizedTextService | |
IPublished |
publishedValueFallback | |
IContent |
contentTypeService |
Methods
View SourceGetAllowedProperties()
Returns a collection of allowed properties.
Declaration
public IEnumerable<PropertyModel> GetAllowedProperties()
Returns
Type | Description |
---|---|
IEnumerable<Property |
GetContentTypes()
Gets a list of all content types
Declaration
public IEnumerable<ContentTypeModel> GetContentTypes()
Returns
Type | Description |
---|---|
IEnumerable<Content |
GetFilterConditions()
Returns a collection of constraint conditions that can be used in the query
Declaration
public IEnumerable<object> GetFilterConditions()
Returns
Type | Description |
---|---|
IEnumerable<System. |
PostTemplateQuery(QueryModel)
Declaration
public QueryResultModel PostTemplateQuery(QueryModel model)
Parameters
Type | Name | Description |
---|---|---|
Query |
model |
Returns
Type | Description |
---|---|
Query |