[Mediawiki-l] Detecting main page with conditional statement?
Alexis Moinet
alexis.moinet at fpms.ac.be
Wed Oct 24 07:03:56 UTC 2007
Teemu Lantta wrote :
> I just can't figure out how to make an if expression on skin/template
> file that checks if you are on main page or not - and after that writes
> some html. The problem seems to be that I can't find the freakin
> variable that contains the name of current page or article.
you can use this :
<?php
//check whether the page is main page in any language
if ( $this->data['title'] == wfMsgForContent('mainpage') ) { ?>
some html here
<?php } else { ?>
some html here
<?php } ?>
More information about the MediaWiki-l
mailing list