From Bjoern Hassler's website
Jump to: navigation, search

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

when what we want is

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.

1 title functions[edit]

It's possible to change the title:

WETitle is effectively something like:


2 but ...[edit]

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...

3 Next attempt[edit]

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.