Mediawiki/Title
From Bjoern Hassler
It's possible to hide the title string through css (see Mediawiki/Hiding the main page title). However, sometimes we may want to hide the title based on a template. We may want to hide the title, show the navigation first, and the redisplay the title. Essentially, the problem is this: By default, we get
Page title < base page | etc | etc ~NAVIGATIONAL~MENU~
when what we want is
~NAVIGATIONAL~MENU~ Page title < base page | etc | etc
Below are some ideas and some experiments (mostly disabled now). Final outcome: Mediawiki/TitleHere.
For an example, see HCPT.
[edit] 1 title functions
It's possible to change the title:
- WETitle (via extension)
- Displaytitle (built-in)
WETitle is effectively something like:
{{DISPLAYTITLE:{{{1|{{SUBPAGENAME}} }}} }}
[edit] 2 but ...
In the monobook skin,
<h1 id="firstHeading" class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
and so the title cannot be removed.
So we amend the skin, and introduce two special titles: __NOTITLE__, __MOVETITLE__. (Would be better to do this through a magic word.)
Idea 1: We remove the title completely, and then put the title and contentSub in further down:
Idea 2: We move the title into the main content div, so that we can work with css more easily: Movetitle
Neither of those work really well...
[edit] 3 Next attempt
The next attempt was to create a parser function, that can hide the title, example here parser fn.
More discussion of the extension here: Mediawiki/TitleHere.