Search Results for

    Show / Hide Table of Contents
    View Source

    Interface ITagQuery

    Provides methods for querying content and media by their associated tags.

    Namespace: Umbraco.Cms.Core.PublishedCache
    Assembly: Umbraco.Core.dll
    Syntax
    public interface ITagQuery
    Remarks

    Tags are organized into groups and can be culture-specific. This interface allows retrieval of content, media, and member items by their tags, as well as listing all available tags.

    Methods

    View Source

    GetAllContentTags(string?, string?)

    Gets all document tags.

    Declaration
    IEnumerable<TagModel?> GetAllContentTags(string? group = null, string? culture = null)
    Parameters
    Type Name Description
    string group
    string culture
    Returns
    Type Description
    IEnumerable<TagModel>
    Remarks

    If no culture is specified, it retrieves tags with an invariant culture. If a culture is specified, it only retrieves tags for that culture. Use "*" to retrieve tags for all cultures.

    View Source

    GetAllMediaTags(string?, string?)

    Gets all media tags.

    Declaration
    IEnumerable<TagModel?> GetAllMediaTags(string? group = null, string? culture = null)
    Parameters
    Type Name Description
    string group
    string culture
    Returns
    Type Description
    IEnumerable<TagModel>
    View Source

    GetAllMemberTags(string?, string?)

    Gets all member tags.

    Declaration
    IEnumerable<TagModel?> GetAllMemberTags(string? group = null, string? culture = null)
    Parameters
    Type Name Description
    string group
    string culture
    Returns
    Type Description
    IEnumerable<TagModel>
    View Source

    GetAllTags(string?, string?)

    Gets all tags.

    Declaration
    IEnumerable<TagModel?> GetAllTags(string? group = null, string? culture = null)
    Parameters
    Type Name Description
    string group
    string culture
    Returns
    Type Description
    IEnumerable<TagModel>
    View Source

    GetContentByTag(string, string?, string?)

    Gets all documents tagged with the specified tag.

    Declaration
    IEnumerable<IPublishedContent> GetContentByTag(string tag, string? group = null, string? culture = null)
    Parameters
    Type Name Description
    string tag
    string group
    string culture
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    GetContentByTagGroup(string, string?)

    Gets all documents tagged with any tag in the specified group.

    Declaration
    IEnumerable<IPublishedContent> GetContentByTagGroup(string group, string? culture = null)
    Parameters
    Type Name Description
    string group
    string culture
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    GetMediaByTag(string, string?, string?)

    Gets all media tagged with the specified tag.

    Declaration
    IEnumerable<IPublishedContent> GetMediaByTag(string tag, string? group = null, string? culture = null)
    Parameters
    Type Name Description
    string tag
    string group
    string culture
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    GetMediaByTagGroup(string, string?)

    Gets all media tagged with any tag in the specified group.

    Declaration
    IEnumerable<IPublishedContent> GetMediaByTagGroup(string group, string? culture = null)
    Parameters
    Type Name Description
    string group
    string culture
    Returns
    Type Description
    IEnumerable<IPublishedContent>
    View Source

    GetTagsForEntity(int, string?, string?)

    Gets all tags attached to an entity.

    Declaration
    IEnumerable<TagModel?> GetTagsForEntity(int contentId, string? group = null, string? culture = null)
    Parameters
    Type Name Description
    int contentId
    string group
    string culture
    Returns
    Type Description
    IEnumerable<TagModel>
    View Source

    GetTagsForProperty(int, string, string?, string?)

    Gets all tags attached to an entity via a property.

    Declaration
    IEnumerable<TagModel?> GetTagsForProperty(int contentId, string propertyTypeAlias, string? group = null, string? culture = null)
    Parameters
    Type Name Description
    int contentId
    string propertyTypeAlias
    string group
    string culture
    Returns
    Type Description
    IEnumerable<TagModel>
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX