The Joli Table of contents block is the newest and most flexible way to insert a TOC in your articles.
You can find it in the block list, under the WIDGETS category, or simply type “Joli Table of contents” upon creating a block like in the screenshot below.
The actual block will the show like so (but the theme will not render in the back-end) :
Insert the block anywhere in your content, and hide or edit some headings to your liking. If the auto-insert
Hide specific headings
It is now possible to hide specific unwanted headings from the list.
To hide headings, simply click on the “eye” icon toggle. Click again to revert.
Hidden headings will be marked with a strike-through line and grayed out.
Hidden headings will then not render on the front-end.
⚠️ It is not recommanded to hide a heading that has children headings as it will break the original hierarchy of the headings. You should hide the children elements as well.
Edit specific headings
Editing headings lets you rename any heading to your liking.
To edit a heading, either click on the pencil icon or double click on the heading.
You can now type and change the actual heading name.
Press enter or click away to validate.
All the edited headings will be shown in blue and with a trailing star “*”.
To revert the heading back to its original name, click the revert icon next to the pencil icon.
Edit headings processing rules
Headings pick up any content from the article, even the content that does not currently show (such as shortcodes). If a shortcode were to output some headings, the Joli Table of contents block will pick it up.
To modifiy the processing rules, click on the Joli Table of contents block and on the right panel, browse the block settings to the HEADINGS section.
In the below screenshot, we selected only “H2” headings. The block instantly refreshes with the new settings.
You can also use the Skip by class and/or Skip by ascending class settings.