[Mediawiki-l] Change logo according to namespace

Haim (Howard) Roman roman at jct.ac.il
Mon Aug 24 21:57:23 UTC 2009


I'd like to change the logo (set by $wgLogo) according to the current
namespace.  But how to get the current namespace?  The only way I can see is
to call getNamespace(), e.g., in the Wiki.php of my wiki:

$ret = Title::newFromURL( $title );
...
$ret->getNamespace() != NS_SPECIAL

Is that the way?  If so, how would I set "$ret" (in this case) to be the
title of the current page?

Thanks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Haim (Howard) Roman
Computer Center, Jerusalem College of Technology
Phone: 052-8-592-599 (6022 from within Machon Lev)


More information about the MediaWiki-l mailing list