1
/* title may have been set from the cache */
$t = $wgOut->getPageTitle();
if( empty( $t ) ) {
$wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
}
# Replace title for subpage feature
# Author: Lionel Brits
# Date: March 26, 2007
# Email: lionelbrits@gmail.com
$wgOut->setPageTitleWithSubpages( $wgOut->getPageTitle(), $this->mTitle->getSubpageText() );
# Replace the above line with the following if you want the HTML title and page title to be the same; Editing OutputPage.php is then unnecessary.
# $wgOut->setPageTitle( $this->mTitle->getSubpageText() ); 1
public function setPageTitleWithSubpages($fullname,$name)
{
$this->setPageTitle( $name);
$this->setHTMLTitle( wfMsg( 'pagetitle', $fullname ) );
}1
You need to log in in order to reply to this topic.