开发者

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

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


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.


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


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜