Search Results for

    Show / Hide Table of Contents
    View Source

    Class ContentTagsExtensions

    Provides extension methods for the IContentBase class, to manage tags.

    Inheritance
    object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Core.dll
    Syntax
    public static class ContentTagsExtensions

    Methods

    View Source

    AssignTags(IContentBase, PropertyEditorCollection, IDataTypeService, IJsonSerializer, string, IEnumerable<string>, bool, string?)

    Assign tags.

    Declaration
    public static void AssignTags(this IContentBase content, PropertyEditorCollection propertyEditors, IDataTypeService dataTypeService, IJsonSerializer serializer, string propertyTypeAlias, IEnumerable<string> tags, bool merge = false, string? culture = null)
    Parameters
    Type Name Description
    IContentBase content

    The content item.

    PropertyEditorCollection propertyEditors
    IDataTypeService dataTypeService
    IJsonSerializer serializer
    string propertyTypeAlias

    The property alias.

    IEnumerable<string> tags

    The tags.

    bool merge

    A value indicating whether to merge the tags with existing tags instead of replacing them.

    string culture

    A culture, for multi-lingual properties.

    View Source

    RemoveTags(IContentBase, PropertyEditorCollection, IDataTypeService, IJsonSerializer, string, IEnumerable<string>, string?)

    Remove tags.

    Declaration
    public static void RemoveTags(this IContentBase content, PropertyEditorCollection propertyEditors, IDataTypeService dataTypeService, IJsonSerializer serializer, string propertyTypeAlias, IEnumerable<string> tags, string? culture = null)
    Parameters
    Type Name Description
    IContentBase content

    The content item.

    PropertyEditorCollection propertyEditors
    IDataTypeService dataTypeService
    IJsonSerializer serializer
    string propertyTypeAlias

    The property alias.

    IEnumerable<string> tags

    The tags.

    string culture

    A culture, for multi-lingual properties.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX