Difference between revisions of "Customize Navigation - Mediawiki"

From Help Wiki
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{TwoColumn|lead=
 
How to customize Navigation.
 
|content=
 
 
== Contents ==
 
== Contents ==
 
The contents of the navigation bar can be edited using the <tt>'''[[MediaWiki:Sidebar]]'''</tt> message page. To access this page, enter the title as shown into the "search" box and click ''Go'' or
 
The contents of the navigation bar can be edited using the <tt>'''[[MediaWiki:Sidebar]]'''</tt> message page. To access this page, enter the title as shown into the "search" box and click ''Go'' or
Line 37: Line 34:
  
 
The third element references [[MediaWiki:Forums-url]], which will contain the full external URL for the "forums", while using a plain label. Item four demonstrates direct linking to an external source.
 
The third element references [[MediaWiki:Forums-url]], which will contain the full external URL for the "forums", while using a plain label. Item four demonstrates direct linking to an external source.
|sidebar=
+
 
{{Mediawiki Help}}
+
{{GetHelp}}
+
}}
+
 
[[Category: Mediawiki]]
 
[[Category: Mediawiki]]
  

Latest revision as of 11:59, 15 November 2016

Contents

The contents of the navigation bar can be edited using the MediaWiki:Sidebar message page. To access this page, enter the title as shown into the "search" box and click Go or

  1. Click on Special pages in the toolbox menu.
  2. Click on All pages.
  3. Change the drop-down menu to "MediaWiki."
  4. Type Sidebar and click Go.
  5. Click on Sidebar.
  6. Click the Edit tab.


The format of this message is as follows:

* navigation
** mainpage|mainpage
** Special:Recentchanges|Recent changes
** recentchanges-url|recentchanges
** http://www.mediawiki.org|MediaWiki home

This snippet demonstrates the various formats available for use.

Subheadings

The navigation bar can be split into sections, each with a heading of its own. The heading for each section is taken from the first-level list element (in the example above, "navigation", for instance).

If this text corresponds to the name of a system message, i.e. a page with that title exists in the MediaWiki namespace, then the text of the message is used as a label, otherwise the title is used as-is.

Links

The second-level list elements each correspond to a link on the navigation bar, where the format is:

** target|caption

As above, if element text corresponds to the name of a message, then the text of the message is used instead. In the example above, MediaWiki:Mainpage contains the name of the main page, e.g. Main Page, and so both the target and caption are expanded to that text. However, MediaWiki:Recent changes does not exist, so in the case of the example, the label text for the second item is used as-is. This has the disadvantage that the preference setting of the interface language does not work for such a label.

The third element references MediaWiki:Forums-url, which will contain the full external URL for the "forums", while using a plain label. Item four demonstrates direct linking to an external source.

See Navigation Help for a more detailed help.