Table Of Contents CK is a Joomla plugin that allows you to create the table that lists automatically all headings in your article and create the links to them.
How to add a table of contents in my article
You article is made of headings like H2, H3, and so on. Table Of Contents CK is based on the hierarchy of these headings. To add the TOC in your article you just need to place this tag
It will automatically parse your headings and create the table accordingly. Note that the headings will get new IDs (if no ID already exists) so that the link that scroll to each one.
Table Of Contents CK is compatible with Scroll To CK to make the scrolling smooth. To use it, just enabled Scroll To CK and it will take effect (the classes are automatically added by Table Of Contents CK to make it work).
How to automatically add the TOC to all my articles
You can go in the plugin Content >> Table Of Contents CK
and enable the option
Using this option, you don't need to add the code manually in your articles, the table of contents will be added automatically.
- It will not be added in the category/blog layout (the tag is removed, but no TOC is added)
- to disable the TOC in some articles, you can use the tag {notoc} in the article. The plugin will detect the tag and cancel the TOC for this article
How to load a TOC in a module
Sometimes you want to place the table of contents in a module, and not in the article itself. It can be useful to display the TOC in a column, aside the main content.
You can do that using Table Of Contents CK byt using the tag like that
where XX
is the article ID. Typically you can use that in a custom module (mod_custom). Note that you must enable the Content plugins in the advanced options of the module to make it work.
News