This contrib packages in a convenient way the Javascript library and the CSS file needed to implement TWisty Sections.
To use the libraries, you must place the following scriplet either in the head section of the page (by modifying the TWikiSkins) or putting it somewhere in the topic:
<style type="text/css" media="all"> @import url("%PUBURLPATH%/TWiki/TwistyContrib/twist.css"); </style> <script type="text/javascript" src="%PUBURLPATH%/TWiki/TwistyContrib/twist.js"></script>
It's recommended to use the TWiki:Plugins.TwistyPlugin, as it eases the deployment and use of this contrib.
Caution: If the previous scriplet is put in the HEAD section of the page or the TWiki:Plugins.TwistyPlugin is used, it won't work if the
<body onload="">
manager is set by the skin. Check the twist.js file for an idea on how to register an eventmanager for the onload event without overwriting the previous one.
This Contrib should work in all versions of TWiki. It has been tested against TWiki:Codev.CairoRelease and TWiki:Codev.DakarRelease
.
Skins can customize the color of the twisty placeholder by modifiying the .twistyPlaceholder
style.
TwistyContrib.zip
in your ($TWIKI_ROOT) directory. Content: File: | Description: |
---|---|
data/TWiki/TwistyContrib.txt | NEW |
lib/TWiki/Contrib/TwistyContrib.pm | NEW |
pub/TWiki/TwistyContrib/toggle-optm-jsoff-sep.html | NEW |
pub/TWiki/TwistyContrib/twist.css | NEW |
pub/TWiki/TwistyContrib/twist.js | NEW |
TwistyContrib_installer
to automatically check and install other TWiki modules that this module depends on. You can also do this step manually.
If the contrib is properly installed (and Javascript is enabled in your browser!), then you should see some folding sections below. Look at /twiki/bin/view/TWiki.TwistyContrib?raw=on to see how it's done.
Expand... Hamlet is without question the most famous play in the English language... Collapse...
Authors: | Javascript created by TWiki:Main.SamHasler![]() ![]() |
Copyright ©: | 2005 Sam Hasler and Rafael Alvarez |
License: | GPL![]() |
Dependencies: | None |
12/09/2005 | 1.000 First Version |
Home: | http://TWiki.org/cgi-bin/view/Plugins/TwistyContrib![]() |
Feedback: | http://TWiki.org/cgi-bin/view/Plugins/TwistyContribDev![]() |
Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/TwistyContribAppraisal![]() |
Related Topics: TWikiPreferences
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
![]() |
toggle-optm-jsoff-sep.html | r0 | manage | 1.7 K | 2005-09-11 - 08:28 | UnknownUser | Example of usage |
![]() |
twist.css | r0 | manage | 0.1 K | 2005-09-11 - 08:27 | UnknownUser | Style Sheet |
![]() |
twist.js | r0 | manage | 3.4 K | 2005-09-11 - 08:26 | UnknownUser | Javscript library |