Template talk:TOC

Special Table of Contents
Hello, the mentioned special table of contents do not exist in this wiki, or at least I couldn't find it. Maybe this section needs some update? --Zabien (talk) 13:01, 13 November 2014 (UTC)

Hello, same for me. Whare can I find this template?

Hello, same for me. Any news? --User:Bilou0675 (talk) 23 July 2015

User:Zabien, User:Bilou0675: It should be fixed now, thanks to User:Hashar. --ZFilipin (WMF) (talk) 10:43, 6 October 2016 (UTC)


 * ZFilipin Ah, so it never existed. Thank you! :) ––Zabien (talk) 12:49, 12 October 2016 (UTC)

hide only some headings from TOC?
is it possible to hide sections from TOC on a per-section base? I want to have them structured and to have headings, but I do not want some sections to appear in the TOC, but cannot use limit, as the sections-to-hide are not all on the same level --80.146.245.99 08:34, 12 September 2016 (UTC)

toclimit not working
isn't working here. Any fix?

"Protecting" one section from the TOC
Hello, is there a mark-up that I can do to protect one section from the TOC? It is my main title that I do not want included in the TOC. My title is this:   Cochrane Acute and Emergency Care Review Group Network: Reviews to be considered for Wikipedia:

If I can modify it so that it is not recognized by the TOC that would be great! Thanks! JenOttawa (talk) 18:15, 25 January 2019 (UTC)


 * Hi, Jen. Well, first let me lead off with a disclaimer: You didn't say why you're asking and it's not really any of my business, but if this is for Wikipedia, you really shouldn't do this. The page TOC isn't just for "looks", it's also used by assistive screen readers for the vision-impaired, and all sorts of other code that cares about the structure of the page — reason enough to be very wary of messing with its contents. In fact, what I'm about to suggest is prohibited in the Wikipedia article space (see wikipedia:WP:PSEUDOHEAD). ...But if it's for some other use, then that doesn't apply, so go wild!


 * The simplest way to keep a heading out of the table of contents is to make it not a heading. In fact, Wikipedia has a template specifically for that purpose, which is heavily used in documentation and other behind-the-scenes code that needs to show examples of heading formatting, without actually creating a heading. (Because a real heading would show up in the TOC...) That template is.


 * You can see the documentation at its page, but basically you just give it a num argument (where num is the heading level you want to emulate, from 1 to 6), and the text of the heading as the only other argument. It'll output something like this:


 * Level 2 heading
 * Level 2 heading


 * Of course, I didn't actually use Template:fake heading above, because this is MediaWiki and not Wikipedia, so the template isn't available here. What I actually did was, I entered  into Wikpedia's Special:ExpandTemplates, then copied the resulting HTML output and pasted it in here.


 * Which sort of brings me to my other point: Since (based on the code you provided above) you're planning to heavily modify the appearance of the heading anyway, there's really no reason you need to use any kind of heading — at all! You could just change the  tags in your example code to  (paragraph) tags. The text would look the same (because of the styling on both that element and the around it), but it would no longer register as a heading to the MediaWiki software.


 * Everything else would be unchanged — you can style  tags just like headings, and you can set  attributes on them and use those IDs as link destinations, (If you need to link to the non-heading heading with , for instance.) The only difference is, because it's not a heading, the TOC won't even know it exists.


 * Hope I was able to be of some help. -- FeRDNYC (talk) 22:04, 31 January 2019 (UTC)