AutoTOC (new)

Reworked version of original AutoTOC plugin by Gert Hengeveld

Based on original AutoTOC plugin by Gert Hengeveld

This Cotonti plugin automatically generates a Table Of Contents for any page. HTML heading tags are extracted and listed in a tree. The page body is modified to include anchors in source HTML.

#1. Features of new AutoTOC

  • Fixed bug with output empty TOC on some pages
  • Fixed GHengeveld/AutoTOC#1 (wrong numbering on same titles)
  • Now used canonical URL for TOC
  • Customizing and overriding TOC display style via resource strings
  • Added configurable class and prefix for TOC item
  • Allow TOC elements with attributes
  • Allow unlimited nesting

#2. Installation

Simply upload the plugin folder to your /plugins directory and enable the plugin in your Administration panel.

#3. Configuration

The plugin has some configurable setting. You can configure the HTML tags that should be included in the TOC. Default value is h2,h3. (Nesting is now ot limited to 2 levels.)
Also you can change class and prefix for TOC item. 

Plugin page on GitHub  https://github.com/macik/cot-autotoc-2/


1. Roffun  24.01.2016 16:01

Полезный плагин, было бы неплохо добавить .tpl файл скина, чтобы не править autotoc.resources.php.

2. Macik  22.03.2016 23:57

Править файл autotoc.resources.php не надо, достаточно переопределить эти строки в своей теме в файле `theme.php`.

3. Roffun  23.03.2016 11:31

Тоже вариант

4. Hantr  22.03.2018 06:49

Не понятно как он работает в папке скина создал папку modules там создал page.list.docs.tpl в админке в структуре страниц укзал docs чтоб подгрузился tpl шаблон  page.list.docs.tpl, в итоге он подгурузился, вставил туда тег {PAGE_TOC} не работает( Что я сделал неправильно?(

Додавання комментарів доступно лише зареєстрованим користувачам