Sorry, my site is very outdated – a new one is coming soon!

MODX: TableOfContentsX

A new MODX extra for creating a Table of Contents based on the resources content.


This extra takes your MODX content and creates an ordered list Table of Contents based on the h1, h2, h3, h4, h5 and h6 tags. This can be used so that long articles and pages can be broken down and makes it easier for the user to click a section they'd like to jump to.

Download TableOfContentsX


This is the main/only snippet included in this package and takes a template variable/chunk/placeholder and generates the Table Of Contents. The snippet has one parameter and that is to select what it should output:-

  • toc - This will output an ordered list with links to your page header tags
  • content - This will output your page content with your header tags with anchors

A typical way of using this would be to do the following: -


Support & Credits

If you have any problems or have ideas/suggestions, please let me know on the TableOfContentsX Github page.

Based on code by Joost de Valk,

Comments 0

There are no comments on this yet.

Got something to say?

Join the discussion! You know how these things work; enter your details and comments below and be heard.

  1. Allowed tags: <b><i><br>