]> sipb.mit.edu Git - ikiwiki.git/blob - doc/ikiwiki/directive/tag.mdwn
force rebuild from pre 20100422
[ikiwiki.git] / doc / ikiwiki / directive / tag.mdwn
1 The `tag` and `taglink` directives are supplied by the [[!iki plugins/tag desc=tag]] plugin.
2
3 These directives allow tagging pages. List tags as follows:
4
5         \[[!tag tech life linux]]
6
7 The tags work the same as if you had put a (hidden) [[ikiwiki/WikiLink]] on
8 the page for each tag, so you can use a [[ikiwiki/PageSpec]] match all
9 pages that are tagged with a given tag, for example. The tags will also
10 show up on blog entries and at the bottom of the tagged pages, as well as
11 in RSS and Atom feeds.
12
13 If you want a visible [[ikiwiki/WikiLink]] along with the tag, use taglink
14 instead:
15
16         \[[!taglink foo]]
17         \[[!taglink tagged_as_foo|foo]]
18
19 Note that if the wiki is configured to use a tagbase, then the tags will be
20 located under a base directory, such as "tags/". This is a useful way to
21 avoid having to write the full path to tags, if you want to keep them
22 grouped together out of the way.
23
24 Bear in mind that specifying a tagbase means you will need to incorporate it
25 into the `link()` [[ikiwiki/PageSpec]] you use: e.g., if your tagbase is
26 `tag`, you would match pages tagged "foo" with `link(tag/foo)`.
27
28 If you want to override the tagbase for a particular tag, you can use
29 something like this:
30
31         \[[!tag /foo]]
32         \[[!taglink /foo]]
33
34 [[!meta robots="noindex, follow"]]