Enables scripted content fragments to get tags.

Properties

NameTypeDescriptionDefaultOptions
CurrentIList<string>

Methods

Add

Add a tag or tags to a piece of content.

Usage

#set($additionalInfoResponse = $core_v2_tags.Add($contentUrl, $applicationId, $tags, "%{TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentUrlstringContent UrlRequired
applicationIdGuidApplication IdRequired
tagsstringComma-separated list of tagsRequired
TypeIdGuidCategorization typeOptional

Return Type

AdditionalInfo

Add

Creates a seed tag.

Usage

#set($additionalInfoResponse = $core_v2_tags.Add($tag, "%{ApplicationId = $applicationIdArg, ApplicationTypeId = $applicationTypeIdArg, TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
tagstringTagRequired
ApplicationIdGuidA content application identifier to filter byOptional
ApplicationTypeIdGuidA content application type identifier to filter byOptional
TypeIdGuidA tag type identifier to filter byOptional

Return Type

AdditionalInfo

Add

Add a tag or tags to a piece of content.

Usage

#set($additionalInfoResponse = $core_v2_tags.Add($contentUrl, $applicationId, $tags))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentUrlstringContent UrlRequired
applicationIdGuidApplication IdRequired
tagsstringComma-separated list of tagsRequired

Return Type

AdditionalInfo

Add

Add a tag or tags to a piece of content.

Usage

#set($additionalInfoResponse = $core_v2_tags.Add($contentId, $contentTypeId, $tags))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired
tagsstringComma-separated list of tagsRequired

Return Type

AdditionalInfo

Add

Add a tag or tags to a piece of content.

Usage

#set($additionalInfoResponse = $core_v2_tags.Add($contentId, $contentTypeId, $tags, "%{TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired
tagsstringComma-separated list of tagsRequired
TypeIdGuidCategorization typeOptional

Return Type

AdditionalInfo

CanAddTags

Checks whether the accessing user can add tags to this content type.

Usage

#set($booleanResponse = $core_v2_tags.CanAddTags($contentId, $contentTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired

Return Type

bool

CanAddTagsInApplication

Checks whether the accessing user can add seed tags for a specific application

Usage

#set($booleanResponse = $core_v2_tags.CanAddTagsInApplication($applicationId, $applicationTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
applicationIdGuidApplication IdRequired
applicationTypeIdGuidApplication Type IdRequired

Return Type

bool

CanAddTagsInApplicationType

Checks whether the accessing user can add seed tags for a specific application

Usage

#set($booleanResponse = $core_v2_tags.CanAddTagsInApplicationType($applicationTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
applicationTypeIdGuidApplication Type IdRequired

Return Type

bool

CanDeleteTagsInApplication

Checks whether the accessing user can remove tags in bulk for a specific application

Usage

#set($booleanResponse = $core_v2_tags.CanDeleteTagsInApplication($applicationId, $applicationTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
applicationIdGuidApplication IdRequired
applicationTypeIdGuidApplication Type IdRequired

Return Type

bool

CanDeleteTagsInApplicationType

Checks whether the accessing user can remove tags in bulk for a specific application type

Usage

#set($booleanResponse = $core_v2_tags.CanDeleteTagsInApplicationType($applicationTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
applicationTypeIdGuidApplication Type IdRequired

Return Type

bool

CanRemoveTags

Checks whether the accessing user can remove tags from this content type.

Usage

#set($booleanResponse = $core_v2_tags.CanRemoveTags($contentId, $contentTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired

Return Type

bool

CanRenameTagsInApplication

Checks whether the accessing user can rename tags in bulk for a specific application

Usage

#set($booleanResponse = $core_v2_tags.CanRenameTagsInApplication($applicationId, $applicationTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
applicationIdGuidApplication IdRequired
applicationTypeIdGuidApplication Type IdRequired

Return Type

bool

CanRenameTagsInApplicationType

Checks whether the accessing user can rename tags in bulk for a specific application

Usage

#set($booleanResponse = $core_v2_tags.CanRenameTagsInApplicationType($applicationTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
applicationTypeIdGuidApplication Type IdRequired

Return Type

bool

Delete

Delete a tag.

Usage

#set($additionalInfoResponse = $core_v2_tags.Delete($tag, "%{ApplicationId = $applicationIdArg, ApplicationTypeId = $applicationTypeIdArg, TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
tagstringTagRequired
ApplicationIdGuidA content application identifier to filter byOptional
ApplicationTypeIdGuidA content application type identifier to filter byOptional
TypeIdGuidA tag type identifier to filter byOptional

Return Type

AdditionalInfo

Get

Get tags for a piece of content.

Usage

#set($apiListResponse = $core_v2_tags.Get($contentId, $contentTypeId, "%{TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired
TypeIdGuidCategorization typeOptional

Return Type

ApiList<ContentTag>

Get

Get tags for a piece of content.

Usage

#set($apiListResponse = $core_v2_tags.Get($contentId, $contentTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired

Return Type

ApiList<ContentTag>

Get

Get tags for a piece of content.

Usage

#set($apiListResponse = $core_v2_tags.Get($contentUrl, $applicationId, "%{TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentUrlstringContent UrlRequired
applicationIdGuidApplication IdRequired
TypeIdGuidCategorization typeOptional

Return Type

ApiList<ContentTag>

Get

Get tags for a piece of content.

Usage

#set($apiListResponse = $core_v2_tags.Get($contentUrl, $applicationId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentUrlstringContent UrlRequired
applicationIdGuidApplication IdRequired

Return Type

ApiList<ContentTag>

List

Gets a list of tags given the options provided.

Usage

#set($pagedListResponse = $core_v2_tags.List("%{ApplicationIds = $applicationIdsArg, ApplicationTypeIds = $applicationTypeIdsArg, ContainerIds = $containerIdsArg, ContentTypeIds = $contentTypeIdsArg, LogicallyOrTags = $logicallyOrTagsArg, MinimumContentCount = $minimumContentCountArg, PageIndex = $pageIndexArg, PageSize = $pageSizeArg, SortBy = $sortByArg, SortOrder = $sortOrderArg, Tags = $tagsArg, TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
ApplicationIdsstringComma-separated list of content application identifiers to filter byOptional
ApplicationTypeIdsstringComma-separated list of content application type identifiers to filter byOptional
ContainerIdsstringComma-separated list of content container identifiers to filter byOptional
ContentTypeIdsstringComma-separated list of content type identifiers to filter byOptional
LogicallyOrTagsboolEnables filtering by logically OR-ing the filter tagsOptionalFalse
MinimumContentCountintSets the minimum number of matching content required to return a tagOptional1
PageIndexintSpecify the page number of paged results to return. Zero-based index.Optional0
PageSizeintSpecify the number of results to return per page.Optional20
SortBystringHow the results will be sorted(Name, ContentCount, LatestTaggedDate)OptionalName
SortOrderstringThe sort order of the itemsOptionalAscending
TagsstringA comma-seperated list of filter tagsOptional
TypeIdGuidA tag type identifier to filter byOptional

Return Type

PagedList<Tag>

ListTaggedContent

Lists tagged content. This method is supported for backwards compatibility, but $core_v2_taggedContent.List() should be used if possible.

Usage

#set($pagedListResponse = $core_v2_tags.ListTaggedContent($tags, "%{PageIndex = $pageIndexArg, PageSize = $pageSizeArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
tagsIList<string>TagsRequired
PageIndexintSpecify the page number of paged results to return. Zero-based index.Optional0
PageSizeintSpecify the number of results to return per page.Optional20

Return Type

PagedList<TaggedContent>

ListTags

Lists tags. This method is supported for backwards compatibility, but $core_v2_tags.List() should be used if possible.

Usage

#set($pagedListResponse = $core_v2_tags.ListTags("%{FilterTags = $filterTagsArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
FilterTagsIList<string>Comma separated list of tags to filterOptional

Return Type

PagedList<Tag>

Remove

Remove a tag or tags from a piece of content.

Usage

#set($additionalInfoResponse = $core_v2_tags.Remove($contentUrl, $applicationId, $tags, "%{TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentUrlstringContent UrlRequired
applicationIdGuidApplication IdRequired
tagsstringComma-separated list of tagsRequired
TypeIdGuidCategorization typeOptional

Return Type

AdditionalInfo

Remove

Remove a tag or tags from a piece of content.

Usage

#set($additionalInfoResponse = $core_v2_tags.Remove($contentId, $contentTypeId, $tags))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired
tagsstringComma-separated list of tagsRequired

Return Type

AdditionalInfo

Remove

Remove a tag or tags from a piece of content.

Usage

#set($additionalInfoResponse = $core_v2_tags.Remove($contentId, $contentTypeId, $tags, "%{TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired
tagsstringComma-separated list of tagsRequired
TypeIdGuidCategorization typeOptional

Return Type

AdditionalInfo

Remove

Remove a tag or tags from a piece of content.

Usage

#set($additionalInfoResponse = $core_v2_tags.Remove($contentUrl, $applicationId, $tags))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentUrlstringContent UrlRequired
applicationIdGuidApplication IdRequired
tagsstringComma-separated list of tagsRequired

Return Type

AdditionalInfo

Rename

Rename a tag.

Usage

#set($additionalInfoResponse = $core_v2_tags.Rename($originalTag, $replacementTag, "%{ApplicationId = $applicationIdArg, ApplicationTypeId = $applicationTypeIdArg, TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
originalTagstringOriginal TagRequired
replacementTagstringReplacement TagRequired
ApplicationIdGuidA content application identifier to filter byOptional
ApplicationTypeIdGuidA content application type identifier to filter byOptional
TypeIdGuidA tag type identifier to filter byOptional

Return Type

AdditionalInfo

Set

Set tags for a piece of content.

Usage

#set($additionalInfoResponse = $core_v2_tags.Set($contentId, $contentTypeId, $tags))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired
tagsstringComma-separated list of tagsRequired

Return Type

AdditionalInfo

Set

Set tags for a piece of content.

Usage

#set($additionalInfoResponse = $core_v2_tags.Set($contentId, $contentTypeId, $tags, "%{TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentIdGuidContent IdRequired
contentTypeIdGuidContent Type IdRequired
tagsstringComma-separated list of tagsRequired
TypeIdGuidCategorization typeOptional

Return Type

AdditionalInfo

Set

Set tags for a piece of content.

Usage

#set($additionalInfoResponse = $core_v2_tags.Set($contentUrl, $applicationId, $tags))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentUrlstringContent UrlRequired
applicationIdGuidApplication IdRequired
tagsstringComma-separated list of tagsRequired

Return Type

AdditionalInfo

Set

Set tags for a piece of content.

Usage

#set($additionalInfoResponse = $core_v2_tags.Set($contentUrl, $applicationId, $tags, "%{TypeId = $typeIdArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentUrlstringContent UrlRequired
applicationIdGuidApplication IdRequired
tagsstringComma-separated list of tagsRequired
TypeIdGuidCategorization typeOptional

Return Type

AdditionalInfo

Sort

Sorts a list of tag instances

Usage

#set($iListResponse = $core_v2_tags.Sort($tags))

Parameters

NameTypeDescriptionRequiredDefaultOptions
tagsIList<Tag>TagsRequired

Return Type

IList<Tag>

Sort

Sorts a list of tag instances

Usage

#set($iListResponse = $core_v2_tags.Sort($tags, "%{CssClasses = $cssClassesArg, MaximumNumberOfTags = $maximumNumberOfTagsArg, MinimumItemsPerTag = $minimumItemsPerTagArg}"))

Parameters

NameTypeDescriptionRequiredDefaultOptions
tagsIList<Tag>TagsRequired
CssClassesIList<string>When provided, applies CSS classes to tags according to their relative use.Optional
MaximumNumberOfTagsintWhen provided, removes tags that are used more than the maximum threshold from the sorted listOptional
MinimumItemsPerTagintWhen provided, removes tags that are used less than the minium threshold from the sorted listOptional

Return Type

IList<Tag>

SupportsTags

Check whether the content type supports tagging.

Usage

#set($booleanResponse = $core_v2_tags.SupportsTags($contentTypeId))

Parameters

NameTypeDescriptionRequiredDefaultOptions
contentTypeIdGuidContent Type IdRequired

Return Type

bool

ToStrings

Converts a list of tag instances to a list of tag name strings

Usage

#set($iListResponse = $core_v2_tags.ToStrings($tags))

Parameters

NameTypeDescriptionRequiredDefaultOptions
tagsIList<Tag>TagsRequired

Return Type

IList<string>


Notes

When renaming and deleting tags, only the following contexts are supported in core applications:

  • Blogs: Only a single application context is supported. An ApplicationTypeId and ApplicationId must be specified.
  • Forums: Only an application type context is supported. ApplicationTypeId must be specified. 
  • Wikis: At this time, wikis does not support tag moderation.
  • Media Galleries: Only a single application context is supported. An ApplicationTypeId and ApplicationId must be specified.