Tags and Categories

Tags and Categories are a way of organizing and aggregating content.

Overview #

The tagging system provided by default by Liferay supports both taxonomies and folksonomies. Folksonomies are represented by tags and Taxonomies are represented by categories, which means that tags are freeform (any user can add new tags) whereas categories are declared before and the user can only select from a set. Categories can be classified in vocabularies and from version 6 they can be hierarchical.

Which content can be tagged or categorized? #

The Assets. Any content can be tagged or categorized as soon as it has an asset associated. Most of the contents of the portal have this by default, but it can also easily implemented for you own type of contents (even from a plugin).

Contents that can be tagged or categorized in the core:

  • Blog Entries
  • Web Content
  • Message Boards Messages
  • Wiki Pages
  • Bookmarks
  • Images from Image Gallery
  • Any Document from Document Library
  • Shopping Cart products
  • Knowledge Base Articles (Plugin)
  • Users
  • Organizations and Communities
  • ...

How can I make my contents taggable and categorizable? #

In order to use Liferay tags and categories, you just need to create an Asset for each of your contents. Have a look at AssetEntry.java for more details about it (from version 6) or TagsAsset (version 5.2 and below).

What tools does Liferay offer me? #

You can use the following liferay taglibs and portlets.

  • Taglibs (can be used in your own portlets):
    • Categories Navigation . Allows the user to navigate using categories (<liferay-ui:asset-categories-navigation>).
    • Tags Navigation. Allows the user to navigate using tags (<liferay-ui:asset-tags-navigation>).
    • Categories Selector . Allows the user to select categories (<liferay-ui:asset-categories-selector>).
    • Tags Selector . Allows the user to select tags (<liferay-ui:asset-tags-selector>).
    • Categories Summary . Displays a summary of the categories of a content (<liferay-ui:asset-categories-summary>).
    • Tags Summary . Displays a summary of the tags of a content (<liferay-ui:asset-tags-summary>).
  • Portlets (can be used in a page and provide inter-portlet communication using public render parameters).
    • Asset Publisher: Allows you to filter and disply content depending on the tags or categories that the content has or hasn't in a very flexible way.
    • Categories Navigation: Allows the user to navigate using categories.
    • Tags Navigation: Allows the user to navigate using tags.
    • Tag Cloud: Allows the user to navigate using tags. Tags are displayed with different sizes depending on the number of times that each tag has been used.

Several portlets can use the tags and categories navigation portlets to filter their results. For example, asset publisher, wiki or knowledge base will display results based on the user navigation.

Can I make my own type of contents show up in Asset Publisher ? #

Yes! using the Asset Renderer Framework. You just need to create the Asset for each of your contents and implement the interfaces AssetRenderer.java and AssetRendererFactory.java

Managing Tags and Categories #

From version 6, you will be able to find two new portlets in the section Content of your Control Panel: Tags Administration and Categories Administration. In version 5.2 there is only one portlet called Tags and Categories.

Tagging your Content#

Whether you are creating a Blog, Journal Article, Message Board Entry, or Wiki you will notice the categories selector and tags selector to tag and categorize your content. These selectors can be easily added to your own forms using the taglibs explained above and the values will be automatically read if you use the ServiceContext Pattern.

0 Attachments
79584 Views
Average (4 Votes)
The average rating is 3.75 stars out of 5.
Comments
Threaded Replies Author Date
where do i see the community tag portlet,... kuhajeyan gunaratnam November 8, 2008 3:54 AM
thanks . i found out in a reply here. ... kuhajeyan gunaratnam November 8, 2008 4:00 AM
How do tags effect search engine optimization? ... Ken MacPherson October 20, 2009 10:02 AM
Currently, tags are passed as non-tokenized... Fuad Efendi January 11, 2010 10:50 PM
I'm using the solr-web-6.1.0.1 liferay plugin... Ravish Bhagdev June 20, 2012 5:27 AM
Hi, Just wanted to know is there any limit for... Jyotisankar Dash January 25, 2013 3:58 AM

where do i see the community tag portlet, Global tag portlets & Tagged content portlet. i am using liferay 5.1.1
Posted on 11/8/08 3:54 AM.
thanks . i found out in a reply here.
https://www.liferay.com/web/guest/community/forums/-/message_boards/message/2139­38;jsessionid=BE72EDA22801FF18671A2CDD96C571DF
Posted on 11/8/08 4:00 AM in reply to kuhajeyan gunaratnam.
How do tags effect search engine optimization?

How does Liferay's internal search engine utilize tags when searching content? What effect if any does this have on result set listings?
Posted on 10/20/09 10:02 AM.
Currently, tags are passed as non-tokenized fields.

It means, for instance, that if you tagged article as "snow removal", and this article doesn't have any "snow" or "removal" words inside, it won't be found. But it could be found if you used two tags instead: "snow" and "removal" (although I am not sure that Query Parser will use it).

Search in Liferay is not the best one yet... it doesn't use for instance word stemming, stop words, synonyms, etc; fortunately you can configure it in SOLR, you can use SOLR Plugin now, connecting Liferay to standalone shining Lucene-powered car.

You can even override default Liferay behaviour for tags and tokenize it in separate SOLR field.

-Fuad
+1 416-993-2060
www.tokenizer.ca
Posted on 1/11/10 10:50 PM in reply to Ken MacPherson.
I'm using the solr-web-6.1.0.1 liferay plugin with Solr 3.5.0 and having some problems indexing. Asset tags are not getting indexed in Solr when I index a user that has some tags applied to it? Tags get added in AssetTag table associated with correct userId, but they are not being pushed into Solr.

When I index a blog, the tags are getting indexed as a separate field in Blog document in Solr, but same doesn't seem to happen with users.

I add the asset tag as follows:

final AssetTag tagAsset = AssetTagLocalServiceUtil.addTag(serviceContext.getUserId(), newTag,
new String[] {}, serviceContext);

Any idea what I might be missing? Thanks.
Posted on 6/20/12 5:27 AM in reply to Fuad Efendi.
Hi, Just wanted to know is there any limit for tag & category search? We are facing problem while searching by the category, although there are more than 5020 documents but the category search is fetching 5020 results & its standing still(not increasing). Similarly in the tag search is working for every text except one which is one of the mostly used, so is there any restriction or limit for the tag & category. Thanks in advance for your suggestions.
Posted on 1/25/13 3:58 AM.