Quick proposal - would it be possible to enhance the box macro so that it
includes two extra (optional) parameters:
"hideable"=[true/false]
"initial"=[show/hide]
How about the "Foobar" collapsible titlebar, morphed from Curriki:
http://nielsmayer.com/xwiki/bin/view/Macros/Foobar?viewer=code
http://nielsmayer.com/xwiki/bin/view/Macros/FoobarCSS?viewer=code
Example usage of the "Foobar":
http://nielsmayer.com/xwiki/bin/view/Timeline/NprTimeline
#includeMacros("Macros.Foobar")
#beginsectionandshow("National Public Radio Podcasts", "",
"", "red", false)
.... hideable content goes here ...
#endsection()
To change so that the content is shown by default, change last parameter to
"true".
Or use #beginsection("National Public Radio Podcasts", "",
"", "red"). Note
that
only certain colors in the color parameter are supported by the CSS. The
parameters for the link and its url which are placed near the
expand/collapse icon -- doesn't work that well, so I leave it empty with
""
.
TODO: Remove separate document 'FoobarCSS' and remove the link to it in
'Foobar'. Replace with a call to $xwiki.ssx.use("$doc.fullName") in the
Macro/document "Foobar". Add contents of 'FoobarCSS' as text value to
instance of object XWiki.StyleSheetExtension .
(Question: if I want to have multiple separate instances
XWiki.StyleSheetExtension[0], XWiki.StyleSheetExtension[1] .,,, How would
these be accessed, individually, via $xwiki.ssx.use() or equivalent call?)
Niels
http://nielsmayer.com