Opened 6 years ago
Generate TOC for a set of pages from a particular page
|Reported by:||anonymous||Owned by:||coderanger|
Is there any simple way to generate the TOC for a set of pages from another page? Right now I can generate a TOC for a set of pages as:
[[TOC(TracGuide, TracInstall, TracUpgrade, TracIni, ...)]]
So to show my custom TOC on every subpage, I have to insert it multiple times. Of course, if the TOC changes, I have to adjust it on all subpages, which is a whole lot of work! If the TOC could be generated from a particular page, all I had to do was to generate a page like this:
[TracGuide Trac Guide] [TracInstall Installing Trac] [TracUpgrade Upgrading Trac] [TracIni Trac Ini]
The TOC macro should then be able to transform this page into a TOC.
Now, if the TOC changes, all I have to do is to adjust the MyTocPage and the new TOC will be applied automatically to every page that includes the macro.
What do you think about it?