From ce0037e0ff41a75d0e6c947ef547ef9630c54be9 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 14 Oct 2010 13:38:20 +0200 Subject: Sync with ikiwiki 3.20100926. --- ikiwiki/directive/toggle.mdwn | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 ikiwiki/directive/toggle.mdwn (limited to 'ikiwiki/directive/toggle.mdwn') diff --git a/ikiwiki/directive/toggle.mdwn b/ikiwiki/directive/toggle.mdwn new file mode 100644 index 0000000..bed61c1 --- /dev/null +++ b/ikiwiki/directive/toggle.mdwn @@ -0,0 +1,35 @@ +The `toggle` and `toggleable` directives are supplied by the [[!iki +plugins/toggle desc=toggle]] plugin. + +With these directives you can create links on pages that, when clicked, +toggle display of other parts of the page. + +It uses javascript to accomplish this; browsers without javascript will +always see the full page content. + +Eksempler på brug: + + \[[!toggle id="ipsum" text="vis"]] + + \[[!toggleable id="ipsum" text=""" + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do + eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim + ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut + aliquip ex ea commodo consequat. + + [[!toggle id="ipsum" text="skjul"]] + """]] + +Note that you can include wiki markup in the toggleable text, including even +additional toggles, as shown in the above example. + +Also, the toggle and the togglable definitions do not need to be next to +each other, but can be located anywhere on the page. There can also be +mutiple toggles that all toggle a single togglable. + +The id has a default value of "default", so can be omitted in simple cases. + +If you'd like a toggleable to be displayed by default, and toggle to hidden, +then pass a parameter "open=yes" when setting up the toggleable. + +[[!meta robots="noindex, follow"]] -- cgit v1.2.3