2008-07-21 13:31:57 +02:00
|
|
|
[[!template id=plugin name=toggle author="[[Joey]]"]]
|
|
|
|
[[!tag type/chrome]]
|
2006-11-22 03:28:42 +01:00
|
|
|
|
|
|
|
With this plugin 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:
|
|
|
|
|
2008-07-21 13:46:35 +02:00
|
|
|
\[[!toggle id="ipsum" text="show"]]
|
2006-11-22 03:28:42 +01:00
|
|
|
|
2008-07-21 13:46:35 +02:00
|
|
|
\[[!toggleable id="ipsum" text="""
|
2006-11-22 03:28:42 +01:00
|
|
|
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.
|
|
|
|
|
2008-07-21 13:46:35 +02:00
|
|
|
[[!toggle id="ipsum" text="hide"]]
|
2006-11-22 03:28:42 +01:00
|
|
|
"""]]
|
|
|
|
|
|
|
|
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.
|
2008-07-02 22:02:01 +02:00
|
|
|
|
|
|
|
If you'd like a toggleable to be displayed by default, and toggle to
|
|
|
|
hidden, then pass a parameter "open=true" when setting up the toggleable.
|