For MediaWiki Skin Setting HTML Title to "[Site Name]" instead of "Main Page - [Site Name]"

544 Views Asked by At

I'm using a custom version of the monobook skin. How do I set the HTML title to "[Site Name]" instead of "Main Page - [Site Name]"?

3

There are 3 best solutions below

2
On BEST ANSWER

You should be able to put something like the following in your common.js, and get it to execute on only the Main Page.

if {{{{PAGENAME}}=="Main Page"
  {
  document.title = "{{SITENAME}}";
  }

It's not totally correct because I don't know javascript.

1
On

Try editing [[MediaWiki:Pagetitle]] - set it to "{{SITENAME}}" instead of the default "$1 - {{SITENAME}}".

0
On

Perhaps you can use MediaWikis parser functions to achieve something like what Adrian Archer answered, but run by the server rather than the client (so search engines will take heed). You'll have to edit [[MediaWiki:Pagetitle]] as Joshua C. Lerner said, then. Extension:ParserFunctions is bundled with MediaWiki 1.18 and above, so http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions will help you!