[Mediawiki-l] Adding list subpages to TOC
Giuseppe Briotti
g.briotti at gmail.com
Tue Apr 7 21:20:37 UTC 2009
Hi all, I need a hint for a best practice about to ad some content to the
TOC.
Basically, as example, could be useful for me to add a list of all subpages
to the TOC, say something like this:
Contents [hide]
* 1 Main sections
o 1.1 Categories
* 2 Browsing the manual
* 3 Improving the manual
Subpages
* fist subpage
* second subpage
At the moment, I made this via template, creating a div with __TOC__ and a
DPL result set containing a list
of all the subpages of the current page, and it works fine. Obviously
clicking the [hide] link hides only the TOC
and not the subpages list. Moreover, the two sections are in different table
(in resulting html).
Thus, the question is: "what is the best approach to synchronize the
behavior of TOC and list of subpages?"
1. probably modify the javascript of TOC?
2. probably modify the parser.php? (I really don't like this!!!!!!)
3. creating an extension to manage such stuff? (but in case, how can I have
a list of subpages via php???)
Thanks for any hint....
G.
--
Giuseppe Briotti
g.briotti at gmail.com
"Alme Sol, curru nitido diem qui
promis et celas aliusque et idem
nasceris, possis nihil urbe Roma
visere maius."
(Orazio)
More information about the MediaWiki-l
mailing list