The Joomlashack Blog

Joomla 3.1 is just around the corner; and one of the most exciting proposed features for it is Tags.

The Tags feature is still currently under review. If Tags are included, it would likely be the "poster-child" for the Joomla 3.1 release.

One of the best features about the Tags component is that it allows other extensions to connect to its API and use the tags. Eextension developers can implement tagging into their component and interact with other tags easily.

In the following screenshots, I'll take you through the Tags component, its menu items, and extensions, as well as highlight some of its coolest features along the way.

Tags are controlled via the Tags component

Easy to add new tags Adding a new tag is quite easy and similar to adding a new article. Just go to Tags component, then click on New, and fill in the information within the tabs.

Tags can be nested One of the great features about the Tags implementation is that tags can be nested. One Tag can have a single parent tag and multiple child tags. This allows you to organize tags better and also to display a large number of related tags easier.

Images can be associated with the tags Each tag can also be associated with an image (full image), as well as with a teaser image.

Each component can tag As mentioned in the introduction, one of the best features about the Tags component is that it allows other extensions to use the tags. The core components will also have tagging enabled if the Tags feature gets added to the core. For example, the image above, I've create a Contact within Contact Manager called "Nick Savov", and I assigned the OSTraining Staff, Nick Savov, and Joomla Bug Squad tags to it. For instructions on how to integrate Tags into your own extension, click here.

Display the tags via menu Items There are currently four menu items from which you can choose: Tagged Items Compact list of tagged items Compact Tags View List of all tags

Once you've selected a menu item type, you can select any tag from the Tag drop-down box. Each selected tag is then aggregated within the field and can be deselected by clicking the x next to it.

Remember the Contact that I created? What if I only wanted to display it and any articles with the tags "OSTraining Staff, Nick Savov, and Joomla Bug Squad"? I could simply use a combination of the Tag field and the Type field. The Type field allows me to narrow down my selection and select only the components types that I would like to display, which also contain the above tags.

In the front-end, in the image above, the horizontal text would be my tags, while the list would be the items that contain at least one of those tags, which in this case happens to all be my contacts from Contact Manager.

Advanced menu item options What if you just want to display the tags that contain all the items above? Then you can use the Menu Items options and Match Type by All (see image above). There are also a number of other advanced options (see above).

Additional features The Tags features has the main component and two extra extensions: A Similar Tags module A Smart Search plugin for Tags