Is there a way of making a TOC display as a bulleted list instead of either the numbering or no numbering format? SImply turning off the TOC numbering (while it thankfully gets rid of the outline numbering) does have its problems visually. Ideally displaying it with bullets instead of numbering (or nothing at all) would bean option. Is there a work around through the common.css to do this? Lestatdelc 06:44, 26 January 2012 (UTC)

First sentence in this article notwithstanding, is there a way to put duplicate TOCS in a article? Or grab one page's TOC from another? Or use a template or extension to create a de facto TOC?

I have a request for a wikibook I'm putting together to have a fixed-position sidebar that has a expandable, up-to- date TOC always there. Ideally, I could use a template using CustomNavBlocks that would either allow me to move the per article TOC into that position or duplicate it there.

I am also interested in being able to sew together a global dynamic TOC from all the article TOCs in the Main Page of the "book." --Two7s clash 11:00, 20 April 2010 (UTC)

I'm hoping that someone will answer the first question of this section: is there a way to duplicate the TOC? Having a TOC as the top of a very long page makes for a lot of work for the user. I'd like to put the TOC code at every section (float right). RB

I have been trying for days (to no avail) to make a template with only the names of section headers to be used as a "headers template" for other pages. This way, all of my pages could have the same basic look and section headers, but I could go back and change only the names of the section headers if I chose to at a later time. Currently, the edit section links always take me back to the template itself, and I can't figure out a suitable workaround. Any help would be greatly appreciated. Thanks in advance. 70.129.134.69 20:59, 27 July 2007 (UTC)

Does anyone know how to change the maximum level of section shown by the TOC?

or change the maximum number of levels supported by the section numbering code?

currently it seems to only take 6 levels of numbering.

Does anyone have an answer to these two questions? i'm in the same boat. I need to have the subsection numbering go above the 6 limit it currently has. Any idea where in the code I can change it?. Roger R Cruz

Since the ToC corresponds to the wiki headers, and the wiki headers are translated into HTML header tags (<h1> through <h6>), you'll have to hack core MediaWiki code to get it to go beyond six. Also, since HTML only uses six levels of headers, you'll have to use different tags (or recycle the header tags using a different class attribute, though I don't recommend this) and figure out what the HTML would be for the seventh and beyond headers. —Sledged (talk) 19:42, 23 May 2007 (UTC)

Thank you for the in-depth response. This task would be out of my league now but as I become more familiar with the inner workings, I may attempt it one day. Roger R Cruz 16:32, 24 May 2007 (UTC)

It works for MediaWiki v.1.8.2, thanks! --194.51.20.124 09:17, 6 December 2006 (UTC)

Is there a way to have the section numbers from the TOC show up in the actual sections themselves? This would be very useful when doing documentation for something on a wiki that you eventually print out.

Is there a way to specify the starting section number on a page? This would be useful in a document with multiple pages, each with a TOC, to make the section numbering within each page unique across the set of pages. (The icing on this cake would be to be able to "extract" the TOC from several pages and combine them into a master TOC.) Ok, I've figured out how to do that "extract": just create a composite page made up of all those sub-pages (see Help:Composite pages). Voila! The TOCs are merged (naturally) into a composite TOC. AND... the major sections from each subpage are sequentially numbered in the composite TOC. Perfect! So now, I just need to be able to force a specific value as the starting point for section numbering. Anybody???

Is it possible to make the auto-numbering of sections start at 0 (and the subsections be 0.1, 0.1.1, etc). If not, I suppose I could just use the css trick to remove the section numbers from the TOC and then manually name each of my sections. While this certainly is not the worst option it is less than ideal. Thank you.

I read section help fairly thoroughly and saw the discussion about the 'hidden' id of each section and while I'm not clear on how you figure out the id for a section I'm not sure this would help anyways. What I want to be able to do is use the # prefix to specify a section to jump to but instead of using the section name I want to use the section number. I saw how to do this for editing but I would like to be able to use the same numbering scheme for linking to a section for viewing only. In other words, instead of #section_about_updating_your_sandbox I would like to ref the section with something like #section=3 (assuming that section is the 3rd in the TOC). Thanks! Jmckey 18:30, 2 April 2007 (UTC)

In that case, can anyone think of a way I could add text to a line in the TOC without it affecting the anchor name/link? Something like a comment that does not become part of the actual link/anchor/section name. I want to have comprehensive section names without making linking to each section later a tedious process. I know I can use redirecting, but that seems like a lot of extra maintenance per section that is added. Jmckey 20:42, 5 April 2007 (UTC)

You can put an anchor (see Help:Link#Anchors) where you like, so also at the start of a section. The name can be chosen independently from the section name.--Patrick 22:16, 5 April 2007 (UTC)

The page title is heading 1; the site subtitle is heading 3. Why is the site lower than the page? Why is the subtitle a heading at all?

I'm not sure exactly what you mean, but the Page-heading is H1 because it's (semantically) the most important thing on the page - it tells you what the page is about. The site subtitle is relatively important (or else you wouldn't bother having one), and semantically it's still a heading, hence h3.--Shaper 14:54, 31 July 2006 (UTC)

Why are top-level headings made heading 1 in the HTML, on the same level as the page title, so that most headings are actually level 2?

Because the page-heading is the most important title on the page. "Most headings" are actually subsections of the page title, so they should be a lower-level heading than the page heading.--Shaper 14:54, 31 July 2006 (UTC)

So that when a user without CSS, or a text-mode browser, or a screen reader visits, they'll be presented with a page that at least has a logical document flow. Rob ChurchTalk 07:42, 8 December 2005 (UTC)

Exactly - they're still "headings", and so still deserve an "hX" tag, but (in the cosmic scheme of things) they aren't that important, so they have a low-level heading ("h5").--Shaper 14:54, 31 July 2006 (UTC)

Is it possible, if you have a list of links to sub-pages, to display each of these sub-page TOCs on the upper-level page? --80.164.46.189 17:28, 11 March 2006 (UTC)

By putting __TOC__ where ever you want a table of contents. If you have 4 or fewer headings you can use __FORCETOC__ to display the contents

You can create a "master" TOC by creating a composite page (see Help:Composite pages). The section numbering even comes out sequentially (on the composite page that is.) Ideal would be if you could specifiy a starting section number on each sub-page, so they would match the numbering in the composite TOC.) Anybody know how to do that??

If you would like to have a heading not show up in the generated Table of Contents at the top of the page, you can use HTML to make the header... or at least that worked in older versions!

Unfortunately it doesn't seem to any more (at least, not in 1.6.8). The developers don't seem to give a reason for it, either, nor want to explain why they chose to restrict the functionality in this way. Most annoying.

Anyone else have any idea how to do it, short of writing a new extension for MediaWiki? --Shaper 14:57, 31 July 2006 (UTC)

As seen in the article Help:Wikitext examples, one way is to wrap the section heading in HTML span tags that specify the same style as the wiki uses. The problem I see with that is that those headings won't look right if wiki's stylesheets are changed later. I propose that an extension to the wikitext markup for section headings be created to allow section headings be marked for TOC exclusion. It would need to be something that would be least likely to break current markup, though. Maybe adding an exclamation point followed by a space, like:

i.e. it would work for sections that contain at least two vertical bars, and where the first bar must come immediately after the last equal sign of the section prefix, without any space separator.

spaces are still allowed anywhere between the two vertical bars for the additional attributes.

This means that the following simple section heading:

==Section heading==

== Section heading ==

would become completely equivalent to:

==||Section heading==

==|| Section heading ==

There's much less risk that it will conflict with existing section titles (that don't seem to use any vertical bar).

Note that if a section heading really needs a vertical bar in its first character, you just have to write it this with a space before it:

== |Section heading==

or equivalently (and more robustly) as:

==|| |Section heading ==

or even (for those that already prefer no space between the initial == tag and the final == tag):

==|||Section heading==

This way you can specify an alternate id (in addition to the default id generated for the TOC in the HTML h1...h6 element start tags: it will add an empty anchor automatically).

In addition, some specific "-wiki-" attributes would allow to specify how the section gets numbered in the TOC, or if the numbering should be visible (useful for WikiSources or WikiBooks, to keep the original TOC numbering), using -wiki-number="..." with any convenient numbering string for the TOC, -wiki-toc="include|ignore" ("include" by default), -wiki-number-style="..." for controlling the style of the section number if shown in the section heading.

The specific -wiki- attributes would be converted also in XHTML as regular XML attributes using a "mediawiki:" XML namespace prefix (the namespace "mediawiki" could be declared in the XML/XHTML document header and possibly also the full names of attributes with the "mediawiki:" prefix, in the embedded initial DTD for HTML validators), allowing personal stylesheets to work also with them and change the preferences.

but it seems wrong to embed that kind of thing, and in particular the constant 120%, into an article. It seems like there should either be a special syntax for this, or a template that arranges for the right things to happen.

I've got a template that comes close, but the bottom border line doesn't go all the way across like the "real" section headers' does:

I've got a problem involving sections. Basically, the = and == header comes with a line divider automatically.

What i need is for the === header to come with a line divider. We've tried adding a ---- below the === header to create the line divider, but it doesn't really work. What we get is a very obvious gap between the header and the line divider.

Is there any way at all to create a === heading that has a ---- divider incorporated into it?

If you want it to come with a line everywhere, you could remove 'h3' from this part of main.css (Line 140 here)

Is there such a thing as a horizontal toc? I've looked a lot of places now - and I can't seem to find one, but I figure if anyone knew you guys would. One problem is I can't do this like a css type of thing - any user that comes has to see it horizontally. I was hoping for something like this (with less space in between words):

I suggest create the magic word TOC_FORWARD to show the TOC of the text that appears bellow the magic word (this can include the content of a transcluded template). See an example at commons:Commons:Picture_requests where the sections table of Add request, Upload requested image and See also wouldn´t appear in the page - this is, TOC goes backwards - ). --212.166.203.133 10:44, 5 May 2007 (UTC)

I would like to be able to list the TOC of another page on a different page. I don't know if this is possible, I have been searching and cannot find it. Ideally it would be something like: __TOC:Page_Name__

Is there an alternative to this then? For example, I want to keep things basic. I want my main page to be a "gateway" to the rest of my content. It would be much easier to just include the TOC of the other pages on the main page so I can just click to where I need to go. Otherwise, I have to update the information on the target page and update it again on the "primary index." Suggestions?

This doesn't look very hopeful -- 3½ years and no solution! -- but I would also like to be able to do this. I keep a "to do" page and transclude it to the bottom of my monthly log as a section. I'd like to have the TOC of the to-do page appear at the head of its section on the monthly log, but then I get a repeat of the TOC of the entire log page. Any help? -- Thnidu 15:33, 26 October 2010 (UTC)

It's smart enough to strip out all the markup and hyperlinking from the text to create an anchor with the name "Header Text More Text." Does MediaWiki have a mechanic (outside of using headers) or extension for boiling markup down to just the resulting text? If not can anyone point to me where in the source code it does this so I can extract it and use in an extension? —Sledged (talk) 19:52, 23 May 2007 (UTC)

It actually fails to do that smart stuff consistently, esp. with image parameters. Images in headings are not used in articles, but they are common in WikiProject headings, e.g. those at w:Wikipedia:WikiProject Cue sports#Articles within this WikiProject's scope; edit any of the subsections under that and you'll see what I mean. For example, one shows /* Featured Article former candidates 20px */ in the edit summary instead of /* Featured Article former candidates */ (the wikicode is [[:WP:FA|Featured Article]] former candidates [[Image:Cscr-former.png|20px]]). Not the most common case in the world, but clearly a bug. — SMcCandlish [talk] [cont] ‹(-¿-)› 15:59, 30 November 2007 (UTC)

My workplace still uses v1.4.10 for its internal wiki, but I've got them up to date on another one I'm working on. I just found a bug in the older version, fixed sometime between then and now. See Section linking, the paragraph beginning "To create an anchor target". -- Thnidu 20:25, 12 May 2010 (UTC)

In articles the section edit links are disturbing the layout, so we generally switch them off. On some pages however they are quite useful. So why is no magic word like __FORCEEDITSECTION__ provided? Is there another workaround for this? Bye --89.247.171.48 04:03, 30 October 2010 (UTC) (Rob)

In the following text: "Headers with only one equals sign on a side (=text here=) should only be used sparingly and in prescribed circumstances; this causes a title the size of the page name, which is taken care of automatically. Also, when you create a section header, you can't have other content on the same line. For example ==Section Header==
will not work."

I am a bit confused. What is wrong with using single = headers? Just that the text is the same size as the page title? The phrase "which is taken care of automatically" is not clear. Also, the second part "Also, when you create a section header, you can't have other content on the same line. For example ==Section Header==
will not work." Seems to be completely unrelated to the headers with one =, but the paragraph reads as though they are connected. If I am correct, this should be broken into two bullets or something like that.

Greetings ... im havving a REALLY annoying problem. I have my wiki in a local server and in an server somewhere else.

The CSS are exacly the same BUT, on my local wiki the sections text are in blue (correct) and in the outside server are in black (wrong). even if i modify the main.css in the outside server in wont change to blue. if i apply any other stype, line background color, or underline, etc .. it will apply, but the color it refuses to change. i even tryied to use "!importante" and nothing (locally the the !import works just fine).

I looked into the generated page code to try to figure it out and this is that i found:

In my local server, the section generated code looks like this

<h1>
<span class="mw-headline" id="Overview"> Overview </span>
</h1>

In the other end ... on my external server the section generated code looks like this