Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/geta/tags

Geta Tags for EPiServer CMS
https://github.com/geta/tags

cms episerver

Last synced: about 2 months ago
JSON representation

Geta Tags for EPiServer CMS

Awesome Lists containing this project

README

        

# Geta Tags for EPiServer

* Master

![](http://tc.geta.no/app/rest/builds/buildType:(id:GetaPackages_GetaTags_00ci),branch:master/statusIcon)
[![Platform](https://img.shields.io/badge/Platform-.NET%204.6.1-blue.svg?style=flat)](https://msdn.microsoft.com/en-us/library/w0x726c2%28v=vs.110%29.aspx)
[![Platform](https://img.shields.io/badge/EPiServer-%2011-orange.svg?style=flat)](http://world.episerver.com/cms/)

## Optimizely CMS12?

Looking for for Optimizely CMS12 supprot? We slightly changed the name of the package. Head [over there](https://github.com/Geta/geta-optimizely-tags) for more information.

## Description

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

## Features

- Define tag properties
- Query for data
- Admin page for managing tags
- Tags maintenance schedule job

See the [editor guide](docs/editor-guide.md) for more information.

## How to get started?

Start by installing NuGet package (use [EPiServer NuGet](http://nuget.episerver.com/)):

Install-Package Geta.Tags

The latest version is compiled for .NET 4.6.1 and EPiServer 11.
Geta Tags library uses [tag-it](https://github.com/aehlke/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:

```csharp
[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:

```csharp
IEnumerable GetContentByTag(string tagName);
IEnumerable GetContentsByTag(Tag tag);
IEnumerable GetContentsByTag(string tagName, ContentReference rootContentReference);
IEnumerable GetContentsByTag(Tag tag, ContentReference rootContentReference);
IEnumerable GetContentReferencesByTags(string tagNames);
IEnumerable GetContentReferencesByTags(IEnumerable tags);
IEnumerable GetContentReferencesByTags(string tagNames, ContentReference rootContentReference);
IEnumerable GetContentReferencesByTags(IEnumerable tags, ContentReference rootContentReference);
```

## Customize Tag-it behaviour
You can customize the [Tag-it.js](https://github.com/aehlke/tag-it) settings by using the GetaTagsAttribute.
The following settings can currently be customized

- allowSpaces - defaults to **false**
- allowDuplicates - defaults to **false**
- caseSensitive - defaults to **true**
- readOnly - defaults to **false**
- tagLimit - defaults to **-1** (none)

```csharp
[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](https://github.com/Geta/package-shared/blob/master/README.md#local-development-set-up) 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.

- http://tags.getalocaltest.me

## Package maintainer

https://github.com/patkleef

## Changelog

[Changelog](CHANGELOG.md)