Class ContentTagsExtensions
Provides extension methods for the IContent
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 |
---|---|---|
IContent |
content | The content item. |
Property |
propertyEditors | |
IData |
dataTypeService | |
IJson |
serializer | |
System. |
propertyTypeAlias | The property alias. |
IEnumerable<System. |
tags | The tags. |
System. |
merge | A value indicating whether to merge the tags with existing tags instead of replacing them. |
System. |
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 |
---|---|---|
IContent |
content | The content item. |
Property |
propertyEditors | |
IData |
dataTypeService | |
IJson |
serializer | |
System. |
propertyTypeAlias | The property alias. |
IEnumerable<System. |
tags | The tags. |
System. |
culture | A culture, for multi-lingual properties. |