Authors who manage large amounts of content use tagging for finding and reusing content.
The Content Tags module provides tagging functionality in Magnolia, including the Tags app for deleting and renaming tags as well as managing tag dependencies across content items, and a
tagfn provides methods to find both content that is tagged and tags applied to content items.
Tags vs categories
Tags are keywords or terms assigned to a piece of content. Though similar, tags and categories serve different purposes:
- Categories are groups of pre-defined content that identify the primary topics of your site. In general, content only belongs to one category. For example, in the Magnolia Travel Demo, tours are organized into categories such as Europe, Asia and Africa.
- Tags are free-form and can be defined by authors on the fly. Multiple tags can be applied to many content items. For example, in the Travel demo, a tour can be tagged
adventureregardless of whether it takes place in Europe, Asia or Africa.
Once tagging is enabled for a content app, authors can create and apply tags by selecting item(s) and using the keyboard shortcut T or click the Add tags action to open the tagging dialog.
When you start typing in the Tags field, Magnolia suggests tags that already exist.
Magnolia provides batch tagging so that you can tag a multiple content items in one step.
Use the the
tag: prefix to search through your content on the basis of tags in any content app browser or chooser dialog search field.
Depending on your user permissions, you may also have access to the Tags app. In the Tags app, you can double click on any given tag to see where it is used.
This usage report in the Tags app is useful when you want to remove a tag from all content items where it is used when a campaign ends for instance.
Using tagged content
The tags you apply to content can be used to aggregate and display content in different ways.
For example, content items can be rendered based on tags by creating a template. The
tour-tag page in the demo has a special component called "Tour list by content tag" that renders tours based on their tags.
food tag has been used to aggregate content: