Kontakt oss
Tilbake til bloggen
Development

New version of Geta Tags

The new version now finally supports other types of content like MediaData, BlockData and CatalogContent in addition to PageData.

New version of Geta Tags

Look for Geta.Tags version 2 and above (should be available on nuget.episerver.com 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:

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

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.

Snakk med oss

Har du et prosjekt vi kan hjelpe med?

Ta en uforpliktende prat med teamet vårt om hvordan vi kan løse din utfordring.

Ta kontakt

Hold deg oppdatert på fremtidens e-handel

Ukentlige analyser, trender og praktiske råd — kun det vi selv ville lest.