Search Results for

    Show / Hide Table of Contents
    View Source

    Class TemplateQueryController

    The API controller used for building content queries within the template

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.ControllerBase
    UmbracoApiControllerBase
    UmbracoApiController
    UmbracoAuthorizedApiController
    UmbracoAuthorizedJsonController
    Namespace: Umbraco.Cms.Web.BackOffice.Controllers
    Assembly: Umbraco.Web.BackOffice.dll
    Syntax
    [JsonCamelCaseFormatter]
    public class TemplateQueryController : UmbracoAuthorizedJsonController

    Constructors

    View Source

    TemplateQueryController(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 Source

    GetAllowedProperties()

    Returns a collection of allowed properties.

    Declaration
    public IEnumerable<PropertyModel> GetAllowedProperties()
    Returns
    Type Description
    IEnumerable<PropertyModel>
    View Source

    GetContentTypes()

    Gets a list of all content types

    Declaration
    public IEnumerable<ContentTypeModel> GetContentTypes()
    Returns
    Type Description
    IEnumerable<ContentTypeModel>
    View Source

    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>
    View Source

    PostTemplateQuery(QueryModel)

    Declaration
    public QueryResultModel PostTemplateQuery(QueryModel model)
    Parameters
    Type Name Description
    QueryModel model
    Returns
    Type Description
    QueryResultModel
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • TemplateQueryController(IVariationContextAccessor, IPublishedContentQuery, ILocalizedTextService, IPublishedValueFallback, IContentTypeService)
    • Methods
      • GetAllowedProperties()
      • GetContentTypes()
      • GetFilterConditions()
      • PostTemplateQuery(QueryModel)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX