Tags and categories are two important tools you can use to help organize information on your portal and make it easier for your users to find the content they’re looking for through search or navigation. Tagging and categorizing web content is easy. You can do it at the bottom of the same form you use to add content. If you open the Categorization section of the form, you’ll be presented with an interface for adding tags and categories.
The Control Panel contains an interface for managing tags and categories for each site in the portal. This interface can be used to manage all your tags and categories in one place. It is important that you both tag and categorize your content when you enter it. Let’s take a closer look at tags and categories.
Tags are an important tool that you can use to help organize information on your portal and make it easier for your users to find content that they’re looking for. Tags are words or phrases that you can attach to any content on the website. Tagging content will make your search results more accurate, and enable you to use tools like the Asset Publisher to display content in an organized fashion on a web page. There are two ways to create tags: you can do it through the administrative console in the Control Panel, or on the fly as content is created.
To create tags in the Control Panel, select the site that you want to create tags for, and select Tags. From this screen, you will be able to view any existing tags and make new ones. To create a new tag, simply click Add Tag. You’ll then be asked for the name of the tag, and you’ll have the ability to set permissions for viewing or managing the tag. You can also add properties to a tag. Properties basically act like tags for your tags. Structurally, properties are key-value pairs associated with specific tags that provide information about your tags. You can edit existing tags from the Tags window of on the Control Panel. You can change the tag name, change the tag’s permissions, delete the tag, or add properties.
Tags are not the only portal-wide mechanism for describing content: you can also use categories.
Categories are similar in concept to tags, but are designed for use by administrators, not regular users. Hierarchies of categories can be created, and categories can be grouped together in vocabularies. While tags represent an ad hoc method for users to group content together, categories exist to allow administrators to organize content in a more official, hierarchical structure. You can think of tags like the index of a book and categories like its table of contents. Both serve the same purpose: to help users find the information they seek.
Adding vocabularies and categories is similar to adding tags. Once you’ve selected the site you want to work on, select Categories from the content section of the Control Panel, and you will be presented with the categories administration page.
Clicking on a vocabulary on the left displays any categories that have been created under that vocabulary. You can create new vocabularies simply by clicking Add Vocabulary and providing a name for it. You can create categories in a similar fashion by choosing a vocabulary on the left, and then selecting Add Category. Like tags, you can also provide properties for categories. Once you have created some vocabularies and categories, you can take advantage of the full capabilities of categories by creating a nested hierarchy of categories. To nest categories, select what you want to be the parent category, then drag any category that you want to become a child category onto it. You will see a plus sign appear next to the name of the category you are dragging if you can add it to the selected parent category; if you see a red x that means that you cannot add that category as a subcategory of parent category that you have selected.
Once you have created a hierarchy of categories, your content creators will have them available to apply to content that they create. Navigate to the Web Content page of the Control Panel and click Add Content. Click the Categorization link from the right-side menu and click Select on the vocabulary you would like to use. A dialog box will appear with your categories. Select any relevant categories by checking the box next to them, and they will be applied to the content.
There are a several new enhancements to vocabularies and categories in Liferay 6.1. The three main features are targeted vocabularies, single/multi-valued vocabularies, and separated widgets for every vocabulary.