We would like to display numbers in the titles in our MediaWiki wiki.

Specifically: in the table of contents numbers are shown like this:

 1 Title
   1.1 Subtitle
 2 Another title

However, on the page the titles (that map to the table of contents) appear like this:

 Title
  text
 Subtitle
  text
 Another title
  text

That is, no numbers are shown.

How can we show numbers in the page contents?

There are three possible ways that this could be answered (that I can think of). In our order of preference, they are:

  1. Setting per user
  2. Setting per page
  3. Global setting (for all users)
link|improve this question

Please edit your question to give it consistency. You bounce back and forth between title and page. Which is it? – John Gardeniers Mar 18 '11 at 11:45
@John - I don't know what you mean. The table of contents is first - which shows the title numbers. Then there are titles below (rest of the page) that don't show title numbers, just text. – Wikis Mar 18 '11 at 11:52
Ok, you're talking about title entries in the table of contents but when I read the question and its title it looks like you're talking about page titles, not the table of contents. – John Gardeniers Mar 18 '11 at 11:55
@John - OK, sorry for the confusion and thanks for the clarification. I will update the question. – Wikis Mar 18 '11 at 12:00
feedback

2 Answers

If you want to add it by default for all users add a line:

$wgDefaultUserOptions['numberheadings'] = 1;

to your LocalSettings.php. See here for reference.

link|improve this answer
excellent, thanks! I can't accept this because it wasn't my first preference (that was setting per user) but I can upvote! If someone adds setting per page we'll have the set! =:-) – Wikis Mar 18 '11 at 13:37
feedback
up vote 0 down vote accepted

This is Murphy's Law. Despite Googling for the answer I could not find it until after I had posted the question.

The answer comes from: add numbers to section headings?

It is: user PREFERENCES -> MISC -> check Auto-numbering of heading.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.