[xwiki-users] Change Numbering in TOC Macro
There is an example on how to change TOC numbering: http://extensions.xwiki.org/xwiki/bin/view/Extension/TOC+Macro#HExample3:Dif... However, it does not work, and even the screenshot on that page does not display the expected result, namely "Level 2" with prefix "1.1" Can you provide a working example and update the TOC macro documentation? Our desired result is like this: http://i.imgur.com/J1V7Z5n.png (as it was the default in mediawiki) Thank you, Mario
On 10/26/2016 03:03 PM, Hofstätter Mario wrote:
There is an example on how to change TOC numbering: http://extensions.xwiki.org/xwiki/bin/view/Extension/TOC+Macro#HExample3:Dif... However, it does not work, and even the screenshot on that page does not display the expected result, namely "Level 2" with prefix "1.1" Can you provide a working example and update the TOC macro documentation? Our desired result is like this: http://i.imgur.com/J1V7Z5n.png (as it was the default in mediawiki)
Thank you, Mario
The toc sample code actually worked for me - mostly; to avoid confusion with a numbered list in the navigation I had to restrict the numbering to the content-area, like: #xwikicontent ol { list-style-type: none; counter-reset: say; } #xwikicontent ol li:before { counter-increment: say; content: counters(say,".") ". "; } Then it worked for me "as advertised" (and yes, not like the screenshot in the docs). Are you sure the CSS in the Stylesheet is active in the page? As this is somewhat advanced CSS, maybe it just does not work in your browser? (unlike the MediaWiki solution, which renders the numbering in the HTML) Clemens
Clemens Klein-Robbenhaar wrote
to avoid confusion with a numbered list in the navigation I had to restrict the numbering to the content-area, like:
#xwikicontent ol { list-style-type: none; counter-reset: say; } #xwikicontent ol li:before { counter-increment: say; content: counters(say,".") ". "; }
Thank you, this did the trick. This time, the original example also displayed the numbering, but wrong as you stated. Not sure why it didn't have any effect last time, I tried different browser. I briefly tried different settings for "Caching policy" and "use this extension", but all combinations seem to work now. I will update the documentation of the TOC macro. -- View this message in context: http://xwiki.475771.n2.nabble.com/Change-Numbering-in-TOC-Macro-tp7601718p76... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (3)
-
Clemens Klein-Robbenhaar -
Hofstätter Mario -
Mario