]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/toggle.mdwn
* pagetemplate: don't display template name
[ikiwiki.git] / doc / plugins / toggle.mdwn
1 [[template id=plugin name=toggle author="[[Joey]]"]]
2 [[tag type/chrome]]
3
4 With this plugin you can create links on pages that, when clicked, toggle
5 display of other parts of the page.
6
7 It uses javascript to accomplish this; browsers without javascript will
8 always see the full page content.
9
10 Example use:
11
12         \[[toggle id="ipsum" text="show"]]
13
14         \[[toggleable id="ipsum" text="""
15         Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
16         eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
17         ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
18         aliquip ex ea commodo consequat.
19
20         [[toggle id="ipsum" text="hide"]]
21         """]]
22
23 Note that you can include wiki markup in the toggleable text,
24 including even additional toggles, as shown in the above example.
25
26 Also, the toggle and the togglable definitions do not need to be next to
27 each other, but can be located anywhere on the page. There can also be
28 mutiple toggles that all toggle a single togglable.
29
30 The id has a default value of "default", so can be omitted in simple cases.