]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/tag.mdwn
on the security of this plugin..
[ikiwiki.git] / doc / plugins / tag.mdwn
1 [[!template id=plugin name=tag author="[[Joey]]"]]
2 [[!tag type/tags type/link]]
3
4 This plugin allows tagging pages. List tags as follows:
5
6         \[[!tag tech life linux]]
7
8 The tags work the same as if you had put a (hidden) [[ikiwiki/WikiLink]] on
9 the page for each tag, so you can use a [[ikiwiki/PageSpec]] match all
10 pages that are tagged with a given tag, for example. The tags will also
11 show up on blog entries and at the bottom of the tagged pages, as well as
12 in RSS and Atom feeds.
13
14 If you want a visible [[ikiwiki/WikiLink]] along with the tag, use taglink
15 instead:
16
17         \[[!taglink foo]]
18         \[[!taglink tagged_as_foo|foo]]
19
20 This plugin has a configuration option. Set --tagbase=tags and links to tags
21 will be located under the specified base page. If ikiwiki is configured
22 this way, then the example above actually tags the page with the tags
23 tags/tech, tags/life, and tags/linux. This is a useful way to avoid
24 having to write the full path to tags, if you want to keep them grouped
25 together out of the way.
26
27 If you want to override the tagbase for a particular tag, you can use
28 something like this:
29
30         \[[!tag ./foo]]
31         \[[!taglink /foo]]
32
33 [[!if test="enabled(tag)" then="""
34 This wiki has the tag plugin enabled, so you'll see a note below that this
35 page is tagged with the "tags" tag.
36 """]]