[pmwiki-users] figuring out table of contents location
Petko Yotov
5ko at 5ko.fr
Sat Jul 21 12:52:38 CDT 2012
tamouse mailing lists writes:
> What I want is for the table of contents for the page to appear in the
> side bar rather than in the wikitext area. The only one I could manage
> to make do this is HandyToc, but it has the disadvantage (for me) of
> requiring javascript.
AutoTOC allows that, but it only works in browsers with JavaScript enabled.
See as an example http://www.pmwiki.org/wiki/Test/AutoTOC where the table of
contents is in the top of the sidebar. To set this, we have this line in
local/Test.AutoTOC.php :
$AutoTocPosition = "wikileft";
where "wikileft" is the id attribute of the HTML element where I want the
TOC to appear. From your code, it may be "pagetoc". (I haven't tested if it
will work with the HTML5 tag <aside> but it should.)
Petko
More information about the pmwiki-users
mailing list