Class ContentTagsExtensions
Provides extension methods for the IContentBase class, to manage tags.
Inheritance
System.Object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Core.dll
Syntax
public static class ContentTagsExtensions
Methods
View SourceAssignTags(IContentBase, PropertyEditorCollection, IDataTypeService, IJsonSerializer, String, IEnumerable<String>, Boolean, 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 | |
System.String | propertyTypeAlias | The property alias. |
IEnumerable<System.String> | tags | The tags. |
System.Boolean | merge | A value indicating whether to merge the tags with existing tags instead of replacing them. |
System.String | culture | A culture, for multi-lingual properties. |
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 | |
System.String | propertyTypeAlias | The property alias. |
IEnumerable<System.String> | tags | The tags. |
System.String | culture | A culture, for multi-lingual properties. |