The tag service offers developers the ability to allow members of the site to tag user-generated content.
Tags can be created and displayed on-site using the Tags/Tagged Content widget extensions and the Tags/Tagged Content in-process APIs. Developers can also use the Aggregate Tags/Aggregate Tagged Content REST endpoints along with the Telligent Evolution OAuth Service to offer tagging functionality in external applications. The widget extensions and in-process API support tagging and displaying tags for content types implementing the ITaggableContentType interface. The REST endpoints also support tagging and displaying tags for for defined content types, but additionally support tagging custom content in the form of a URL when used in conjunction with an OAuth client.
Additionally, content implementing ITaggableContentType can be extended to also support hashtagging. Content types implementing the IHashTaggableContentType interface can be used with the $core_v2_hashTag Widget Extension, HashTags In-Process API Service and Hash Tag REST Endpoints to retrieve and embed hashtags within content. Content edited using the rich text editor or <textarea></textarea>s decorated with the evolutionComposer jQuery plugin support identifying hashtags by prefixing tag text with a # symbol. Note that external content (content defined by URL) cannot support hashtags.
Add the tagging UI to a Studio Widget
To add support for rendering and editing tags on a supporting content item, use the following syntax in a Widget Studio widget:
where $contentId is the GUID identifying the individual content item and $contentTypeId is the GUID identifying the type of the content. The content ID is exposed on all core entities, for example, a blog post returned from $core_v2_blogPost.Get(). The content type is exposed on the primary extension from which the content item is retrieved; for example the blog post content type ID is exposed as $core_v2_blogPost.ContentTypeId.
This call will render the standard tag listing UI inline (with a link to edit the tags inline as well). To adjust the tagging UI, additional options are exposed on the $core_v2_ui.Tag() method, or the Tag API can be used directly by interacting with the $core_v2_tags and $core_v2_taggedContent widget extensions or the aggregate tagged content and aggregate tags REST endpoints.
While it is perfectly acceptable to use url-based content with tags, if a developer finds they are doing so quite a bit they should consider creating a custom application type and content type for deeper integration that can support other core services like comments, ratings, search, etc.