Questions answered by this recipe
How can I create a FAQ list where the answers are hidden by default but can be individually shown by clicking a button or the question?
How can I create a definition list where the display of each definition is instantly switchable?
dltoggle.php integrates TJK_ToggleDL by Thierry Koblentz - www.TJKDesign.com (see demo) into pmwiki, to create FAQ toggle lists using
: term : definition markup. TJK_ToggleDL is published under the terms of the Creative Commons License for non-commercial use.
(:dltoggle:) Definition list(s): : term : definition : term : definition Subheaders etc. : term : definition : term : definition etc. (:dltoggleend:)
Add (above the list) optional buttons to 'Show All' and 'Close All' definitions with
(:input submit id=DLToggleOn value='Open All' class=inputbutton:)and
(:input submit id=DLToggleOff value='Close All' class=inputbutton:)
Between these two markups any definition list element is treated with a toggle button. This makes it possible for instance to have several lists, divided by subheaders, like on the cookbook page.
Edit the css file to load different plus and minus button images etc.
- 2006-10-28: Added $RecipeInfo
- 2006-08-09: Fixed <p> </p> tags around <script>.
- 2006-04-11a: dltoggle.zipΔ New file locations. Reworked code to allow for multiple lists. New start and end markup. Added variable for tooltip, internationalised (
Show/hide the answer).
- 2006-04-11: TJK_ToggleDL.zipΔ initial release.
If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".
See discussion at FAQToggleList-Talk