X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/19c58ac7c139eb3509f190e9ce746bd9f6237c90..2c310f8349182ca155a8cad1d8454f9937e87527:/doc/plugins/toggle.mdwn diff --git a/doc/plugins/toggle.mdwn b/doc/plugins/toggle.mdwn index fd3e935da..d1500eba0 100644 --- a/doc/plugins/toggle.mdwn +++ b/doc/plugins/toggle.mdwn @@ -1,32 +1,7 @@ -[[template id=plugin name=toggle author="[[Joey]]"]] -[[tag type/chrome]] +[[!template id=plugin name=toggle author="[[Joey]]"]] +[[!tag type/widget]] -With this plugin you can create links on pages that, when clicked, toggle +This plugin provides the [[ikiwiki/directive/toggle]] and +[[ikiwiki/directive/toggleable]] [[directives|ikiwiki/directive]]. +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. - -Example use: - - \[[toggle id="ipsum" text="show"]] - - \[[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="hide"]] - """]] - -Clicking on "more" will toggle the display of the togglable text. - -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.