Multiple TOC with MediaWiki using section headings in single page
Posted
by
user1704043
on Pro Webmasters
See other posts from Pro Webmasters
or by user1704043
Published on 2012-09-27T17:08:42Z
Indexed on
2012/10/01
3:51 UTC
Read the original article
Hit count: 271
mediawiki
I'm running my own installation of MediaWiki, which has been great! I haven't been able to find the answer to this small problem in any post, how to, etc. Here's the setup:
Article
TOC (limited to showing only H1 and H2)
==H1==
===H2===
====H3====
====H3====
I don't want the H3 to show up on the main table of contents, because it would make the list very long. Instead, under the H2, I would like to display another TOC with all the H3's under that listing.
From my understanding, you cannot have multiple table of contents on a single page. I've thought about making a template for each H2 that has the H3 links, but that seems like it duplicates a lot of work and creates loads of pages. I'd love a template that sucks all subsection names and spits them out, but I don't see how to do that.
Alternatively, is there a way to enable multiple TOCs in a custom install of MediaWiki that I'm missing? Even that would get closer to what I'm trying to do.
© Pro Webmasters or respective owner