Tags

What are tags?

Tags are like hierarchically organized wiki entries, however with them you can categorize a wiki entry under multiple tags and not just under one hierarchy. You can then search for wiki entries categorized under a tag or a collection of tags. In other words, tags provide a faceted classification system for the Trac wiki.

As an added bonus, tags are linked to the wiki entry of the same name, allowing you to describe them explicitly under the wiki entry of the same name. This allows for a flexible means for establishing the context of wiki entries. Besides this, tags also make it incredibly easy to create todo? lists or indexes?.

Tags don't have to be predefined. As long as there are wiki entries categorized under a tag, it'll be automatically created.

Tags are similar to labels in gmail, tags in the social bookmark manager, del.icio.us and the photo sharing site, Flickr and WikiMedia categories. They are substantially different than the latter because tags are associated with wiki entries of the same name, whereas WikiMedia Categories are just indexes.

This implementation of wiki tagging is specific to Trac. To stay consistent with the way Trac names wiki entries, tags are case sensitive.

Also see the idea's background? and improvements? being implemented/considered. Finally see for still more relevant details, see the links discussing tags?.

Don't forget to check out the examples? of tags in action.


How do I use tags?

Tags are implemented as a set of WikiMacros and template:

  • ListTags?
    • With no parameters - Lists all tags and number of entries underneath each tag.
    • With parameters - Find elements categorized in the tags specified by the parameters.
  • TagIt? - Assigns a tag to the current wiki entry. For your convenience, you don't have to use this macro directly. The
  • Modified wiki template? - Makes it easier to use templates without having to remember the syntax for the TagIt macro.
    If you opt to use this macro, note that as you modify tags via the "Change information", "Tag under:" field, macro calls inside the wiki content will be modified automatically to place the appropriate call to the TagIt macro. You should not change those manually.

The setup document? describes how you can install tags on your Trac installation.

How do I apply a tag?

To create a tag, follow these steps:

  1. Go to the wiki entry you want to tag.
  2. Click on "Edit This Page"
  3. Under "Change information", "Tag under:", enter the tag you want to categorize the entry under.
  4. Click "Save changes".

The wiki entry you edited is now categorized under the tag you specified.

How do I apply multiple tags?

To create a tag, follow these steps:

  1. Go to the wiki entry you want to tag.
  2. Click on "Edit This Page"
  3. Under "Change information", "Tag under:", enter the tags you want to categorize the entry under. Separate the tags by commas. Note that white spaces are currently not supported and will be replaced by commas.
  4. Click "Save changes".

The wiki entry you edit is now categorized under the tags you specified.

How do I remove a tag from a wiki entry?

To remove a tag from a wiki entry

  1. Go to the wiki entry you want to "untag".
  2. Click on "Edit This Page"
  3. Under "Change information", "Tag under:", remove the tag from the list.
  4. Click "Save changes".

How do I remove all tags from a wiki entry?

To remove all tags from a wiki entry

  1. Go to the wiki entry you want to "untag".
  2. Click on "Edit This Page"
  3. Under "Change information", "Tag under:", remove everything from the field.
  4. Click "Save changes".

The need for having to do this in two stages has to do with the way tags were implemented for Trac.

How do I list all tags?

Find a wiki entry where you want to list all the tags in Trac. Use the SandBox if this is a one-time thing.

  1. Click on "Edit This Page"
  2. Enter the following:
    [[ListTags]]
  3. Click "Save changes".

All used tags will be listed.

How do I list all the wiki entries categories in a tag?

Find a wiki entry where you want to list the elements categorized in a tag. Use the SandBox if this is a one-time thing.

  1. Click on "Edit This Page"
  2. Enter the following:
    ListTags(tagtofind)
    replacing the tagtofind with the tag you want to find.
  3. Click "Save changes".

Wiki entries in the specified tag will be listed.

How do I list all the wiki entries categorized in multiple tags?

Find a wiki entry where you want to list the wikis categorized in a set of tags. Use the SandBox if this is a one-time thing.

  1. Click on "Edit This Page"
  2. Enter the following:
    ListTags(tagtofind,tagtofind2,tagtofind3)
    replacing the tagtofind, tagtofind2, tagtofind3 with the tags you're looking for.
  3. Click "Save changes".

Wiki entries categorized in all the tags specified will be listed.

In other words, this performs the intersect set operation on sets of elements categorized in each tag. In the future, other set operations such as exclusions and unions may be implemented.


See tags/index for a list of all tags defined in this Wiki.

Error: Failed to load processor TagIt
No macro or processor named 'TagIt' found