Auto TOC in XWiki (second try)

In my opinion an implementation with a Panel would have fairly low maintenance cost given that we already bundle the ToC macro AND a bunch of panels (most of which are less useful than a prospective ToC panel IMO). From what I know, maintenance cost of a panel is not that high.

This one should be pretty simple to do, and panels come with the advantage of:

  • toggable by the admin
  • consistent place in the DOM
  • customizable “easily” by admins (ease is relative, but I think it’s more straightforward than if we implement it with a rendering transformation)
  • Leaves space for the content of the page, easy for users to dismiss/overlook the content of the ToC if they don’t need it.

I can take responsibility of proposing this new panel in the next roadmap if we decide it’s worth it :slight_smile: .


  1. No opinion on my part, I’m not sure what part of the user base would use the ToC if it was included by default on every page (probably would depend on the design we use too :slight_smile: )
  2. No. I think it’s a too high level of abstraction for it to make sense in xwiki-rendering. At least heading numbering has an impact at the level of the heading itself. IMO the ToC is not content and handling it does not fall under the responsibility of xwiki-rendering.
  3. No, those items are not documents so I don’t think they should be inside the document tree. (however an improvement to use an xwiki tree to display the ToC could be something, no strong opinion about it though)
  4. IMO it’s one of the best options (see above)
  5. I think we could achieve a very similar user experience with lower costs and tech debt by using a panel.

Thanks for bringing this discussion forward!
Lucas C.

1 Like