I was going to try to use twistie to build a UI from sections that are used in several places, and noticed the following
- TWISTYTOGGLE{id="login" start="show"} will hide the content if there is no matching TWISTYBUTTON
- there is some real oddity if your page has more than one TWISTYBUTTON with the same id
- the js header is literal text in the pm file - if that gets moved out to a .tmpl file, we can have one TWistie plugin with multiple js backends
- tracked in Item5557, and fixing Item4780 because it will be needed for consistency
and as feature requests
- depressingly for me, I can't specfy an alt text to use for TWISTYBUTTON if there is no JS - I want a twisty, but if i can't have it, for the user to be directed to another topic..
- I'd also love to be able to have TWISTYBUTTON use the alt text if there is no matching TWISTYTOGGLE section on the page
- there's no way to make the configure UI? I thought twistyplugin and configure shared code?
so the big Q is - are you happy to let me add these? and have you other ideas / info that could help me get to this?
--
TWiki:Main/SvenDowideit
- 14 Apr 2008
Twisty is not really made to show other content if javascript if not available. By default it will show the contents.
Surprisingly it will hide contents if only
TWISTYTOGGLE
is used, you explicitly must pass
start="show"
. That may be a bug.
What works is this - be it verbose - construction:
%TWISTYTOGGLE{id="1" start="show" noscript="hide"}%
This text is shown is javascript is ON
%ENDTWISTYTOGGLE%
%TWISTYTOGGLE{id="2" start="hide" noscript="show"}%
This text is shown is javascript is OFF
%ENDTWISTYTOGGLE%
Which results in:
This text is shown is javascript is ON
This text is shown is javascript is OFF
Parameter
id
must be unique. But apparently the plugin does not add ids automatically when they are not passed, as it does with TWISTY. This may be a bug.
The configure accordion has unique code. It is also not without bugs. There is no Twisty code out of the box to create this.
Multiple js backends sounds fine. It would make maintenance easier instead of having 2 Twisty plugins.
--
TWiki:Main.ArthurClemens
- 15 Apr 2008
It turns out that the one TWISTYBUTTON per id is hardcoded into the way that the html id's are built to map to the SECTION names, and the JS Storage - this means that changing it will cause much of the code to need re-writing, and that using 2 TWISTYBUTTON's with the same id produces invalid html - as you get 2 elements with the same ID.
--
TWiki:Main.SvenDowideit
- 22 Apr 2008
I cannot see this is a release blocker. It has been hidden from the Release Blocker view because someone changed the release blocker search in a way that many extensions incl this one was missed.
But now I see it I will downgrade it to normal. Fix it if you want. But if you do not we can still release 4.2.1
KJL 02 Jun 2008