New version of Geta Tags

Frederik Vig 2015-05-23 13:00:32

Look for Geta.Tags version 2 and above (should be available on soon). 

We've upgraded the project to .NET 4.5 and EPiServer 8. All the code has been updated to use ContentReference and ContentData instead of PageReference and PageData. For your convenience we've added new methods for this and kept the old ones (but marked them as obsolete). 

To get started simply install the package:

Install-Package Geta.Tags

Next step is adding the tags property to your content types:

public virtual string Tags { get; set; }

To query for content you can use the ITagEngine. There are now new methods that should cover most needs:

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);

Visit the projects GitHub repository for source code, issue list and more information.

Hope this helps.