This contrib packages in a convenient way the JavaScript library and the CSS file needed to implement Twisty sections.
Changed:
< <
Summary
> >
TwistyContrib is installed by default in TWiki 4 and used by Twisty Plugin.
Changed:
< <
This contrib packages in a convenient way the Javascript library and the CSS file needed to implement TWisty Sections.
> >
It is recommended to use the TwistyPlugin as it eases the deployment and use of this contrib.
Changed:
< <
See the attached file for a demo and an example of usage.
> >
This Contrib should work in all versions of TWiki. It has been tested against TWiki 3 and TWiki 4.
Changed:
< <
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:
It's recommended to use the TWiki:Plugins.TwistyPlugin, as it eases the deployment and use of this contrib.
> >
Generates:
Changed:
< <
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.
<span id="demo2show" class="twistyTrigger twistyMakeVisible"><a href="#">Expand...</a> <span class="twistyPlaceholder">Hamlet is without question the most famous play in the English language...</span></span>
<span id="demo2hide" class="twistyTrigger twistyHidden"><a href="#">Collapse...</a></span>
<span id="demo2toggle" class="twistyContent twistyMakeHidden">
Hamlet is without question the most famous play in the English language. Probably written in 1601 or 1602, the tragedy is a milestone in Shakespeare's dramatic development.
</span>
Changed:
< <
Customization
> >
Generates:
Expand...Hamlet is without question the most famous play in the English language...Collapse...
Hamlet is without question the most famous play in the English language. Probably written in 1601 or 1602, the tragedy is a milestone in Shakespeare's dramatic development.
Skins can customize the color of the twisty placeholder by modifiying the .twistyPlaceholder style.
Some of my TWiki users are impressed by the optical effect of what can be done with TWiki:Plugins.TwistyPlugin - and they keep asking me: "How do I do that? I don't understand the documentation, and I don't understand the raw text of your topics!"
They indeed have a point here. The docs aren't easily understood. It isn't easy to pick all the variables needed from a single example, and just copypasting sometimes fails in embarrassing ways if non-unique id attributes are present in a topic. Maybe it is easy for a power user, but it surely isn't easy enough. There ought to be a way to make it easier.
Well, here you are.
Just set a couple of site preferences, and your users will immediately understand your examples and start writing their own twisties. And what's more: They'll do so in a consistent way, across all your topics in all webs.
You can include the text in a verbatim block if you want (like I have done here).
Additionally I've added plenty of newlines and spaces to make it readable.
This works, and you don't have to care for invalid HTML!
Your Users Write
In any topic, your users can now write things like this:
* *Brace and parenthesize in K&R style*
%FLIP%
When setting out a code block, use the K&R style of bracketing.
That is, place the opening brace at the end of the construct that controls the block. ...
%FLOP%
* *Separate your control keywords from the following opening bracket*
%FLIP%
Control structures regulate the dynamic behaviour of a program, so the keywords
of control structures are the most critical components of a program. ...
%FLOP%
When setting out a code block, use the K&R style of bracketing. That is, place the opening brace at the end of the construct that controls the block. ...
Separate your control keywords from the following opening bracketmore...close
Control structures regulate the dynamic behaviour of a program, so the keywords of control structures are the most critical components of a program. ...
All on, all off
You can toggle all Twisties on or off at once by putting a link or button on the page with class twistyExpandAll or twistyCollapseAll.
Optionally, run TwistyContrib_installer to automatically check and install other TWiki modules that this module depends on. You can also do this step manually.
Alternatively, manually make sure the dependencies listed in the table below are resolved.
Changed:
< <
None
Demo & Text
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.
Click on the button above to fold this section.
Expand...Hamlet is without question the most famous play in the English language...Collapse...
Hamlet is without question the most famous play in the English language. Probably written in 1601 or 1602, the tragedy is a milestone in Shakespeare's dramatic development; the playwright achieved artistic maturity in this work through his brilliant depiction of the hero's struggle with two opposing forces: moral integrity and the need to avenge his father's murder.
More...Hide more
Optionally, run TwistyContrib_installer to automatically check and install other TWiki modules that this module depends on. You can also do this step manually.
Alternatively, manually make sure the dependencies listed in the table below are resolved.
This contrib packages in a convenient way the Javascript library and the CSS file needed to implement TWisty Sections.
Added:
> >
See the attached file for a demo and an example of usage.
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:
Line: 29 to 31
Settings
Changed:
< <
Name of the perl package
> >
Set SHORTDESCRIPTION = Twisty section javascript library to open/close content dynamically
Set STUB = TWiki::Contrib::TwistyContrib
Changed:
< <
One line description:
Set SHORTDESCRIPTION = Placeholder for the twisty javascript library.
Installation Instructions
> >
Installation Instructions
Download the ZIP file from the Plugin web (see below)
Unzip TwistyContrib.zip in your ($TWIKI_ROOT) directory. Content:
Line: 50 to 49
Alternatively, manually make sure the dependencies listed in the table below are resolved. None
Changed:
< <
Demo & Text
> >
Demo & Text
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.
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:
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.
Customization
Skins can customize the color of the twisty placeholder by modifiying the .twistyPlaceholder style.
Settings
Name of the perl package
Set STUB = TWiki::Contrib::TwistyContrib
One line description:
Set SHORTDESCRIPTION = Placeholder for the twisty javascript library.
Installation Instructions
Download the ZIP file from the Plugin web (see below)
Unzip TwistyContrib.zip in your ($TWIKI_ROOT) directory. Content:
Optionally, run TwistyContrib_installer to automatically check and install other TWiki modules that this module depends on. You can also do this step manually.
Alternatively, manually make sure the dependencies listed in the table below are resolved. None
Demo & Text
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.
Click on the button above to fold this section.
Expand...Hamlet is without question the most famous play in the English language...Collapse...
Hamlet is without question the most famous play in the English language. Probably written in 1601 or 1602, the tragedy is a milestone in Shakespeare's dramatic development; the playwright achieved artistic maturity in this work through his brilliant depiction of the hero's struggle with two opposing forces: moral integrity and the need to avenge his father's murder.
More...Hide more
This site is powered by the TWiki collaboration platform. All material on this collaboration platform is the property of the contributing authors. All material marked as authored by Eben Moglen is available under the license terms CC-BY-SA version 4.