Taxonomies

Taxonomies are a way of organizing and aggregating content.

Overview #

Traditionally in Liferay you have only one vocabulary with tags that you can use to classify your contents later search and aggregate them using this tags.

With the new taxonomy system implemented from Liferay Portal 5.2 you can have more than one vocabulary. You can create category trees vocabularies in order to tag your contents and classify them. The Tags Admin portlet has been redesigned and extended in order to support the hierarchical categories concept and now you can create taxonomies or folksonomies inside Liferay.

Taxonomies versus folksonomies #

The main difference between taxonomies and folksonomies is that in taxonomies a closed set of tags, which in Liferay are called "categories" are created and organized in a hierarchical way by the site administrator. Folksonomies are an open set of tags, which in Liferay are called "tags", that could be extended by the end user.

In order to support taxonomies when you create a new vocabulary you must specify if it is a folksonomy or not using the correct editor mode in Tags Admin portlet. The mode is selected using the buttons in the upper left corner just under the search field. For folksonomy, select the "Tag Sets" button, for taxonomy, select the "Categories" button.

In the next screenshot you can see a folksonomy created for tagging photos.

and in this other capture you can see how we have created a partial taxonomy with hierarchical categories to classify the different olympic games sports.

In order to build the tree you need to add categories and then you can drag and drop them to the correct parent category.

Using taxonomies in your portlets #

The taglibs used for folksonomies, have been extended with a new boolean folksonomy param. To display the tags with which users have classified their contents, set this param to true. As an example, to show folksonomy for a particular WebContent journal article, you could use

 
<liferay-ui:tags-summary className="<%= JournalArticle.class.getName() %>" classPK="<%=article.getResourcePrimKey()%>" folksonomy="true" /> }}}

in java code, you can get an array of user defined tags for a particular article with

String[] tagsEntries = TagsEntryLocalServiceUtil.getEntryNames(
  JournalArticle.class.getName(),
  article.getResourcePrimaryKey(),true);

Taxonomies (tags and categories) have permission settings and will not be accessible from portlet code if permissions are not set correctly.

Current limitations #

Right now the system does not support the searching using the full category tree (including the parents of the searched category). Also, it does not support hierarchies with more than one parent for a child node.

Related documents #

2 附件
59060 查看
平均 (1 投票)
满分为 5,平均得分为 3.0。
评论
讨论主题回复 作者 日期
Im very interested in this feature. I thing... Rocco Russo 2008年10月29日 上午3:16
Good point! It would be nice to support a... Jonas Yuan 2009年8月26日 下午12:30
Can you expand on the "param" concept in the... Chris Rocco 2008年12月30日 上午9:07
I am also confused,can anybodu explain "param"... Archi Madhu 2010年1月17日 下午9:34
I updated the entry with an example using the... Tim McGuire 2010年5月14日 上午9:40
Just a simple comment. This explains how to... Iñaki Paz Rey 2009年2月23日 上午2:33
There is something missing here. "So if you... Susan Lacis 2009年5月14日 下午3:46
Or is the word "the" a mistake? The sentence... Juha J 2009年11月10日 上午11:13
Can someone define vocabulary in the context of... Samuel Liu 2010年7月12日 下午4:11
Hello. I'm looking for the same answers. But I... Paulo Pacheco 2011年2月3日 下午12:03
thanks for this, i also read the docs in drupal... Don Baonguis 2011年4月20日 下午3:53
Hi. I've tried to add a property which value... Marcus Alves 2011年11月1日 上午10:06

Im very interested in this feature. I thing that Tags are only the first step to approach a sematic clasification of the contents. I'd like to kwon if in future will be possible to build a complete ontology. In this way all contents can be classified as instance and their properties can be used to navigate through the concept declared in the ontology.
在 08-10-29 上午3:16 发帖。
Can you expand on the "param" concept in the "using taxonomies in your portlets" section above?

Will this allow me to expose/select category tags via Asset Publisher? I can create Categories and Vocabularies, but can not select them via the asset publisher for display.

Q2: Are their any plans to deprecate the "Type" field in Journal and replace it with Category selection?

Thanks,
Chris
在 08-12-30 上午9:07 发帖。
Just a simple comment.
This explains how to create taxonomies, etc. but there is something I miss. What are the properties? How are they used?
Thanks,
Iñaki
在 09-2-23 上午2:33 发帖。
There is something missing here.

"So if you want the (WORD MISSING) to use categories for classifying your contents, you must use this param in order to show the use the correct visual component."
在 09-5-14 下午3:46 发帖。
Good point! It would be nice to support a sematic clasification of assets and to build a complete ontology, based on tags and taxonomies. Looking forward to seeing this feature, too.
在 09-8-26 下午12:30 发帖以回复 Rocky Russian
Or is the word "the" a mistake? The sentence would make sense without it: "So if you want to use categories for classifying your contents, you must use this param in order to show the use the correct visual component."
在 09-11-10 上午11:13 发帖以回复 Susan L Lacis
I am also confused,can anybodu explain "param" part?
Also these categories are used in only web contents?I mean can we use it for document library for classificaton?
在 10-1-17 下午9:34 发帖以回复 Chris Rocco
I updated the entry with an example using the folksonomy param. I looked in the liferay source code in TagsSummaryTag.java
在 10-5-14 上午9:40 发帖以回复 Archi Madhu
Can someone define vocabulary in the context of Liferay? What exactly is a vocabulary and what does it do? This isn't very well explained -- when I go to the category page and see "Add Vocabulary" as well as "Add Category," I ask two questions

1) What is a vocabulary? I haven't heard this used in the context of websites before.
2) What does it have to do with categories? I know what categories are, on the other hand.
在 10-7-12 下午4:11 发帖。
Hello.
I'm looking for the same answers. But I found nothing about it in my studies or the Wiki isn't easy to understand. I found some answers in the Drupal's forum. Here is the address: http://drupal.org/documentation/modules/taxonomy
在 11-2-3 下午12:03 发帖以回复 Samuel Liu
thanks for this, i also read the docs in drupal site.. but STILL i dont know what is the purpose of the key/value pairs for the categories in liferay? :-(
在 11-4-20 下午3:53 发帖以回复 Paulo Blaschke Pacheco
Hi. I've tried to add a property which value was a URL (sample: URL - www.brasil.gov.br ), but Liferay did not accept this. Anyone knows why this occurred? Thanks in advance.
在 11-11-1 上午10:06 发帖。