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 Allegati
59059 Visualizzazioni
Media (1 Voto)
La media del punteggio è 3.0 stelle su 5.
Commenti
Commenti Autore Data
Im very interested in this feature. I thing... Rocco Russo 29 ottobre 2008 3.16
Good point! It would be nice to support a... Jonas Yuan 26 agosto 2009 12.30
Can you expand on the "param" concept in the... Chris Rocco 30 dicembre 2008 9.07
I am also confused,can anybodu explain "param"... Archi Madhu 17 gennaio 2010 21.34
I updated the entry with an example using the... Tim McGuire 14 maggio 2010 9.40
Just a simple comment. This explains how to... Iñaki Paz Rey 23 febbraio 2009 2.33
There is something missing here. "So if you... Susan Lacis 14 maggio 2009 15.46
Or is the word "the" a mistake? The sentence... Juha J 10 novembre 2009 11.13
Can someone define vocabulary in the context of... Samuel Liu 12 luglio 2010 16.11
Hello. I'm looking for the same answers. But I... Paulo Pacheco 3 febbraio 2011 12.03
thanks for this, i also read the docs in drupal... Don Baonguis 20 aprile 2011 15.53
Hi. I've tried to add a property which value... Marcus Alves 1 novembre 2011 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.
Inviato il 29/10/08 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
Inviato il 30/12/08 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
Inviato il 23/02/09 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."
Inviato il 14/05/09 15.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.
Inviato il 26/08/09 12.30 in risposta a 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."
Inviato il 10/11/09 11.13 in risposta a 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?
Inviato il 17/01/10 21.34 in risposta a Chris Rocco.
I updated the entry with an example using the folksonomy param. I looked in the liferay source code in TagsSummaryTag.java
Inviato il 14/05/10 9.40 in risposta a 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.
Inviato il 12/07/10 16.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
Inviato il 03/02/11 12.03 in risposta a 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? :-(
Inviato il 20/04/11 15.53 in risposta a 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.
Inviato il 01/11/11 10.06.