Geta / Tags

Geta Tags for EPiServer CMS
Apache License 2.0
20 stars 31 forks source link
cms episerver

Geta Tags for EPiServer

Optimizely CMS12?

Looking for for Optimizely CMS12 supprot? We slightly changed the name of the package. Head over there for more information.

Description

Geta Tags is a library that adds tagging functionality to EPiServer content.

Features

See the editor guide for more information.

How to get started?

Start by installing NuGet package (use EPiServer NuGet):

Install-Package Geta.Tags

The latest version is compiled for .NET 4.6.1 and EPiServer 11. Geta Tags library uses tag-it jQuery UI plugin for selecting tags. To add Tags as a new property to your page types you need to use the UIHint attribute like in this example:

[UIHint("Tags")]
public virtual string Tags { get; set; }

[TagsGroupKey("mykey")]
[UIHint("Tags")]
public virtual string Tags { get; set; }

[CultureSpecific]
[UIHint("Tags")]
public virtual string Tags { get; set; }

Use ITagEngine to query for data:

IEnumerable<ContentData> GetContentByTag(string tagName);
IEnumerable<ContentData> GetContentsByTag(Tag tag);
IEnumerable<ContentData> GetContentsByTag(string tagName, ContentReference rootContentReference);
IEnumerable<ContentData> GetContentsByTag(Tag tag, ContentReference rootContentReference);
IEnumerable<ContentReference> GetContentReferencesByTags(string tagNames);
IEnumerable<ContentReference> GetContentReferencesByTags(IEnumerable<Tag> tags);
IEnumerable<ContentReference> GetContentReferencesByTags(string tagNames, ContentReference rootContentReference);
IEnumerable<ContentReference> GetContentReferencesByTags(IEnumerable<Tag> tags, ContentReference rootContentReference);

Customize Tag-it behaviour

You can customize the Tag-it.js settings by using the GetaTagsAttribute. The following settings can currently be customized

[CultureSpecific]
[UIHint("Tags")]
[GetaTags(AllowSpaces = true, AllowDuplicates = true, CaseSensitive = false, ReadOnly = true)]
public virtual string Tags { get; set; }

Local development setup

See description in shared repository regarding how to setup local development environment.

Docker hostnames

Instead of using the static IP addresses the following hostnames can be used out-of-the-box.

Package maintainer

https://github.com/patkleef

Changelog

Changelog