[Mediawiki-l] Title for subpages

John Moorhouse john.moorhouse at 3jays.me.uk
Tue Jan 23 19:47:52 UTC 2007

We are developing a wiki for social services documentation, and I'm 
hoping to use subpages as this will in effect have pages with the same 

children with disabilities/forms
child protection/forms

The only comment we have had is that people don't like the page title 
being the full form as you know the parent pages anyway as they are 
listed in the breadcrumbs.

I tried adding the following function to monobook.php, which will change 
the displayed title to just be the bit after the last /

function chop_title($show) {
    if(strrpos($show,'/')) { $show = substr(strrchr($show,'/'),1);};

and changed the line
<h1 class="firstHeading"><?php $this->text('title') ?></h1>
<h1 class="firstHeading"><?php chop_title($this->text('title')) ?></h1>

I've tested the the function outside the monobook.php and it works a 
expected but id doesn't work in situ (has no effect on the displayed title)

Any comments ?



More information about the MediaWiki-l mailing list