• MODX.com

    2,725 downloads

TableOfContentsX

TableOfContentsX is an extra by qodo, first released on 2017-12-13.

Package Description

TableOfContentsX v1.1

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.

Snippet 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 tagscontent - This will output your page content with your header tags with anchors

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

[[*content:TableOfContentsX=`toc`]]

[[*content:TableOfContentsX=`content`]]

Credits

Based on code by Joost de Valk, submitted on 02/08/2011 http://www.westhost.com/contest/php/function/create-table-of-contents/124

For information and support, check out my blog: https://www.qodo.co.uk/blog/tableofcontentsx-a-new-modx-extra-for-creating-a-table-of-contents/

Created by Stewart Orr @ Qodo Ltd (https://www.qodo.co.uk)

Usage/Installation Instructions

Install package using package manager and then follow install instructions in the readme or on my site: https://www.qodo.co.uk/blog/tableofcontentsx-a-new-modx-extra-for-creating-a-table-of-contents/

Details

Developer(s)
qodo
Released
2017-12-18
First seen
2017-12-13
License
GPLv2
Supported databases
Minimum MODX Requirement
2.0

TableOfContentsX Releases

Vendor Signature Released on
MODX.com 1.2-pl 2019-07-23 (5 years ago)
MODX.com 1.1-pl 2017-12-18 (6 years ago)
MODX.com 1.0.1-beta1 2013-08-28 (11 years ago)

We've also seen 1 unverified versions of TableOfContentsX in use, but don't list those as we've been unable of confirming they are official releases from an official source.