Customize page layout

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
Ambox outdated content.svg

This page is outdated.
Please see Manual:Skinning on for more up to date informations.

MediaWiki logo

Special instructions for particular pages[edit]

  • Make no changes to DefaultSettings.php. Copy to LocalSettings.php any line from DefaultSettings.php you may want to change and change it there.

Default skin[edit]

The default skin is Monobook. Its CSS stylesheet is located at skins/monobook/main.css . Much of the following information is based on working with that skin, and has not been checked for applicability to the others.



The best way to change the logo in the top left hand side is to use LocalSettings.php. Look for the variable "$wgLogo". (See How do I customize the logo in the top left corner? for instructions)


You can also customize the logo in the top left hand side by replacing either:

  • stylesheets/images/wiki.png or
  • stylesheets/monobook/images/wiki.png
  • Lately this is: skins/common/images/wiki.png.


The size is 135 px (width) by 155 px (height) (135x135 px with version 1.4).

If your logo is bigger than 135 x 135 ( version 1.4 ) you have to resize it, because the logo hurts the web lay-out. (See also Reducing the size of the logo)

Background image[edit]

Remove background image[edit]

To remove the background image, on the stylesheet (found at skins/monobook/main.css), set body{background-image:none}.

Change background image[edit]

To change the background image, change the headbg.jpg (found at skins/monobook/main.css) file to the desired background image.

Alternativly, you can save the new image with the name headbg.jpg, and then upload the new image to skins/monobook/

Insert at top of page[edit]

If you would like to insert something at the top of the page without using frames, on the stylesheet, set #globalWrapper{position:relative;margin-top:0}, add any CSS you may need, then add your HTML to Monobook.php directly above '<div id="globalWrapper">'.

For full instructions please see: Custom Headers

Insert material elsewhere on the page[edit]

Add it to the Monobook.php or other skin(s) you allow, with the appropriate changes to the CSS.

Reducing skin choices[edit]

The user's skin choices can be reduced by taking the php files for those you do not want out of the skins folder.

Change Navigation list[edit]

Remove navigation link[edit]

To remove a link, change its array reference in the Language.php file to '-'. The array keys for the six links after the main page link are 'portal','currentevents',recentchanges','randompage','help', and 'sitesupport'. For instance, to remove the link that says 'Community portal', add to the bottom of the page:


You could also just change the value in the array above, but putting all changes together at the bottom will help you remember what you changed when you later upgrade the installation. Note the example is for the English version only. It also doesn't seem apply to Ver. 1.12.0. as these links don't seem to be located in this file anymore.

Change navigation link wording[edit]

To change what a link says, for instance if you want it to say 'Donations' instead of 'Community portal', in the Language.php file change the value for the key in question:


Change navigation link target[edit]

To change the target of the link, in the Language.php file change the values for 'portal-url','currentevents-url','recentchanges-url','randompage-url','helppage', and 'sitesupport-url'.

Add navigation link[edit]

To add a link, add to LocalSettings.php:

$wgNavigationLinks[count($wgNavigationLinks)] = array( 'text'=>'newvariable', 'href'=>'newvariable-url' );

and to Language.php:

$wgAllMessagesEn['newvariable']='Link text here'; $wgAllMessagesEn['newvariable-url']='target address here';

OR Just type this http://yoursite/wikifolder/index.php/MediaWiki:Sidebar in your Browser.
or http://yoursite/wikifolder/index.php?title=MediaWiki:Sidebar
Note: 1) yoursite and wikifolder should be named as per your site details
2) You should have sysop or admin priviliges to change this.

Major changes[edit]

If you want to make major changes, it would be easiest to copy the $wgNavigationLinks array from DefaultSettings.php to LocalSettings.php and rewrite it.

CSS stylesheet[edit]

This is what the CSS stylesheet monobook originally looks like when it is opened: