Kentico 8 Tags and Tag Groups

Kyle G asked on November 27, 2014 16:41

Hi there,

I see a lot of postings about Tags and Tag Groups but I don't see anyone answering the question I'm asking.

I essentially want to have managed tags, created by an admin that can be added to a document via a selector by the content editor.

First, I created a tag group but I'm not sure how to add tags to the group. I also added a tag selector field to a page type but when you click Select no tags appear. Also, the ability for the non-admin user to enter custom tags at this point is there and I don't want it to be.

Looking in the database I see a few Tag related tables (CMS_Tag, CMS_DocumentTag, CMS_TagGroup). I tried to insert a record into CMS_Tag but it didn't appear when I tried to use the selector.

I also see a lot of talk about Tag Cloud web parts. How does that fit in?

Any help with this would be much appreciated.

Correct Answer

Vilém Jeniš answered on November 28, 2014 09:41

Hi Kyle!

I'm afraid that what you're looking for, is not how the Kentico tagging system works.

The built-in tags are created when you save a document with them. The Tag-field is parsed and each tag is either created or its usage number increased. I see a way of achieving what you're trying to do with a new and very simple module and the tags would even be automatically included in SmartSearch.

Let me first give you a few link to our documentation concerning Tags:

  1. https://docs.kentico.com/display/K81/Configuring+tags
  2. https://docs.kentico.com/display/K81/Creating+tag+groups
  3. https://docs.kentico.com/display/K81/Tagging+pages
  4. https://docs.kentico.com/display/K81/Displaying+tags+on+a+page

If you ran through these I think you'll agree with me, that the built-in tagging system doesn't work like you need. Here's a link to a page, which is a good start for creating custom modules: https://docs.kentico.com/display/K81/Creating+custom+modules

I can see how your module would have just one object type (Tag), and its own permissions, in order to let an administrator manage the tags. Creating the UI for such module is a piece of cake once you get the hang of it.

Now how to make it appear in the smart search? Well In your page-tape you'd have to include a field for the tags. It would be a UniSelector (preferably) allowing for multiple selection and returning the tag's 'displayname' or whatever column you think is the best suited. This approach has one inconvenience, and that is that if you delete a tag, it won't disappear from the document's properties but only won't be further available for tagging. However this is a very simple solution. Even compared to the one that's built-in. This way the tags are directly included in the page's information, tokenizeable, searchable, ... But you can't track their usage etc. But you could. If you further improve on what I've outlined here...

1 votesVote for this answer Unmark Correct answer

Recent Answers


Kyle G answered on December 2, 2014 18:49

Thanks Vilém. I'd rather try to leverage current tagging functionality instead of getting into custom modules. Maybe I don't need the tags to be admin-managed.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.