Manual:Navigation bar
The navigation bar or side bar or sidebar is shown at the left hand side of each MediaWiki page by default. In versions 1.5 and newer, it can be modified using the MediaWiki:Sidebar page. Use the search box to find this page or follow the Special pages link, to click on System messages (which takes you to Special:Allmessages under a default setup), then look for the sidebar entry in the table.
Contents
[hide]Format of the sidebar page
The sidebar page is laid out similar to the following in MediaWiki:Sidebar :
* navigation ** mainpage|mainpage ** mypage-url|My Page * tools ** Special:Allpages|All Pages
Headings
The items on the first level
* nav * development * resources * réseau * test
are the headings used on the sidebar and are used to break the sidebar into the various boxes seen to the left. The last box created appears above the search box.
Items
The second level items
** mainpage|mainpage ** recentchanges-url|recentchanges ** sourceforge project-url|sourceforge project ** extensions-url|extensions ** skins-url|skins ** CSD-Actuate | CSD-Actuate
and
** Help:Configuration settings|Configuration settings
are the actual links that appear in the sidebar; see below for instructions on setting these up.
Specifying items on the sidebar
All items on the sidebar take a format which is split by a pipe (|) character.
Link target
The left-hand portion of the pipe corresponds to the target of the link, and refers to:
- a MediaWiki: namespace page as listed in Special:Allmessages (implicitly, i.e. without the namespace prefix) or
- a common wiki page link
- an external URL
- MediaWiki namespace page
If a MediaWiki namespace page of the same name exists, then the contents of that page are used to determine where the link points. For example, take the Recent changes line. It is
** recentchanges-url|recentchanges
The result is the equivalent of
{{MediaWiki:recentchanges-url}}|{{MediaWiki:recentchanges}}
which results in Recent changes
- Common wiki page link
This is as above, but a bit simpler, though for some reasons it may be less desirable in some cases.
- External URL
- To link to an external URL, simply create the MediaWiki namespace page containing the target URL:
- the contents of MediaWiki:Mypage-url (from the example above) can be either
- 'http://www.domain.com or as complex as
- "mailto:name@domain.com?cc=name2@domain2.com&bcc=a@b.com&Subject=Mail%20from%20Navigation%20bar&body=Dear%20friends,%0A%0Athis%20and%20that".
- Since MediaWiki version 1.5, you can alternatively link to an external URL by just inserting the target URL before the vertical bar, as in this example:
- http://www.domain.com |Link to Domain
Note the space after the URL.
Display text
The right-hand portion of the pipe determines what is displayed for the link, and is either:
- a MediaWiki namespace page name or
- plain text
If a MediaWiki namespace page of the same name exists, then the contents of that page are used to determine the text displayed for the link. For instance, if the right-hand portion of the pipe contains "Mainpage", and the contents of MediaWiki:Mainpage are Main Page, then "Main Page" is displayed for the link.
You can also place plain text to be displayed here without using a namespace page; so if the right-hand portion of the pipe contains "My_Page", and MediaWiki:My_Page doesn't exist, then the text My Page would be displayed.
While modifying your sidebar, you may experience browser caching problems when working in FireFox. A fix for this is to re-upload the LocalSettings.php file with a slight change - e.g. an extra space in the comments. The caching problem will cease after you hit refresh in the browser and it sees the 'new' LocalSettings.php file. In most Unix type environments, you can just 'touch' the LocalSettings.php file.