[Mediawiki-l] just removing title of main page

Alexis Moinet alexis.moinet at fpms.ac.be
Mon Oct 23 07:32:05 UTC 2006


Dinth a écrit :
>> in monobook.php change :
> 
>> <h1 class="firstHeading"><?php $this->text('title') ?></h1>
> 
>> into
> 
>> <?php if($this->haveData('title') != wfMsgForContent('mainpage')){ ?>
>> <h1 class="firstHeading"><?php $this->text('title') ?></h1>
>> <?php } ?>
> 
> How make this affects 'Main Page' and 'Main Page/Page 1', 'Main Page/Page
> 2', etc?

this should work :

<?php if( $this->haveData('title') != wfMsgForContent('mainpage') && strncmp( $this->haveData('title'), wfMsgForContent('mainpage') . "/" , strlen(wfMsgForContent('mainpage')) + 1 ) != 0 ) { ?>
<h1 class="firstHeading"><?php $this->text('title') ?></h1>
<?php } ?>

or (depending which version of mediawiki you're using)

<?php if( $this->haveData('title') != wfMsgForContent('mainpage') && strncmp( $this->haveData('title'), wfMsgForContent('mainpage') . "/" , strlen(wfMsgForContent('mainpage')) + 1 ) != 0 ) { ?>
<h1 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->text('title'):$this->html('title') ?></h1>
<?php } ?>




More information about the MediaWiki-l mailing list