Dmitriy Sintsov wrote:
I remember that when I've been parsed the page, some javascript was insterted into it to generate the TOC. Perhaps that code would help: skins/common/prefs.js // generate toc from prefs form, fold sections // XXX: needs testing on IE/Mac and safari // more comments to follow function tabbedprefs() { ...
this is taken from 1.14.1
Dmitriy
Javascript is only used for collapsation. The TOC is generated by PHP, as you can test by browsing the page with javascript disabled.
The main TOC handling is at includes/parser/parser.php on function formatHeadings