New plugin for review
[ikiwiki.git] / doc / plugins / contrib / trail.mdwn
1 [[!tag type/chrome patch]]
2
3 Available from [[smcv]]'s git repository, in the `trail` branch. This
4 plugin aims to solve [[todo/wikitrails]] in a simpler way.
5
6 Joey: what do you think of this plugin? If you like the general approach
7 and are likely to include it in ikiwiki, I'll try to modify
8 [[plugins/contrib/album]] to be based on it, rather than partially
9 reinventing it.
10
11 ----
12
13 [[!template id=plugin name=trail author="[[Simon_McVittie|smcv]]"]]
14
15 It's sometimes useful to have "trails" of pages in a wiki, as a guided
16 tour, sequence of chapters etc. In this plugin, a trail is represented
17 by a page, and the pages in the trail are indicated by specially marked
18 links within that page.
19
20 If using the default `page.tmpl`, each page automatically displays the
21 trails that it's a member of (if any), with links to the trail and to
22 the next and previous members.
23
24 The `traillink` [[ikiwiki/directive]] is used to record which pages
25 are in a trail, and simultaneously link to them. Alternatively, the
26 [[ikiwiki/directive/inline]] directive can be used with `trail=yes`
27 to record the inlined pages as part of the trail, in the order in
28 which they are inlined.
29
30 ## Directives
31
32 (These will go to the appropriate pages in [[ikiwiki/directive]] if this
33 plugin is included in ikiwiki.)
34
35 ### traillink
36
37 The `traillink` directive is supplied by the [[!iki plugins/contrib/trail desc=trail]]
38 plugin. This directive appears on the page representing a trail. It acts
39 as a visible [[ikiwiki/WikiLink]], but also records the linked page as
40 a member of the trail.
41
42 Various syntaxes can be used:
43
44     \[[!traillink Badgers]]
45     \[[!traillink How_to_find_mushrooms_using_badgers|badgers]]
46     \[[!traillink badgers text="How to find mushrooms using badgers"]]
47
48 ### trailoptions
49
50 The `trailoptions` directive is supplied by the [[!iki plugins/contrib/trail desc=trail]]
51 plugin. This directive appears on the page representing a trail, and
52 produces no output.
53
54 Currently, the only option supported is `[[!trailoptions circular=yes]]`,
55 which adds links between the first and last pages, turning the trail into
56 a circle.