To install the recipe:
- copy untoggle.js to your (farm's) /pub/ directory.
- add to local/config.php these lines:
Make sure your skin template has the required marker
<!--HTMLFooter--> before the closing
In a wiki page, a "toggle" switch can be either a "div" block, or a term in a definition list. And you just need to add to them the "toggle" class. The very next HTML element will be hidden/shown:
Click here for more info.
The div with class "indent" is the block right after the "toggle" switch, and it will be hidden or shown.
It can contain several paragraphs, tables, images and other elements, but it is exactly the first element after the toggle block.
Example with a table right after the toggle block:
Here is another toggle switch.
Example with a definition list:
- 20090311 : first public release.
- Cookbook /
- FAQToggleList Adding toggle buttons to a definition list (stable)
- ShowHide Adds toggle buttons and links to show/hide sections and objects. Superseded by Toggle. (deprecated)
- Toggle Adds links or buttons for toggling (hiding/showing) div sections and objects (stable)
- ToggleHide Add links to toggle display of html block elements (Stable)
See discussion at UnToggle-Talk
The recipe is enabled on this page, feel free to experiment below.