On Thu, Apr 28, 2011 at 9:57 AM, Thomas Mortagne <thomas.morta...@xwiki.com> wrote: > On Wed, Apr 27, 2011 at 21:42, Joris Dirks <jo...@user.stekje.nl> wrote: >> On Wed, Apr 27, 2011 at 4:57 PM, Vincent Massol <vinc...@massol.net> wrote: >>> Hi Joris, >>> >>> On Apr 27, 2011, at 4:49 PM, Joris Dirks wrote: >>> >>>> I came across an old discussion on automatic numbering of headings, >>>> Vincent Massol offered this solution: >>>> http://www.xwiki.org/xwiki/bin/view/FAQ/NumberedSections >>>> >>>> A great feature, but I am a bit at loss how to implement this in XWiki >>>> 2.0 syntax. >>>> {{velocity}} >>>> #set ($context.tocNumbered = true) >>>> #set ($context.tocData = $tdoc.getTOC(2, 6, true)) >>>> {{/velocity}} >>>> ==example header== >>>> >>>> didn't do the trick. >>>> >>>> Any hints? >>> >>> This is not implemented yet for XWiki Syntax 2.0. >>> >>> The code you pasted above is for XWiki Syntax 1.0. >> >> >> Ah, shame. Hoped there was an easy resolution. Thanks for the swift >> reply though! > > What you could do actually is put some css in a SteelSheetExtension > (see http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial) > with something like > http://daarchitect.wordpress.com/2008/04/09/numbered-headings-in-css/ > (there is lots of other examples in google) in it. > > Then when you want a document to have numbered headings you call in > velocity $xwiki.ssx.use("Space.NumberedStylesheetExtensionDocument") > anywhere in that document (or you write a wiki macro which call that > to make easier to do this when you are in the WYSIWYG for example). > You can also apply this for the whole wiki using "Always" as "Use this > extension" field value. > > And finally you can contribute a nice XAR on extensions.xwiki.org ;)
Thanks Thomas, that sounds like an idea I could actually work out! Will put it on my todo list, and check with a HTML guru about caveats when using CSS numbering (I vaguely remember there were some difficulties, besides old browser compatibility). _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users