Help:Navboxes

From All About Ayrshire
Jump to: navigation, search
Help Files
Getting Started
Wiki Guides
Formatting
Images
Talk and Organisation
Routeboxes, Infoboxes and other Templates
Editing Guidelines
Now what?

The Navbox is a template which sits at the bottom of every page, to aid navigation between related pages.

Usage

{{Navbox|<page>|cat=<cat>|nearby1=<nearby1>|junctions1=<junctions1>}}

<page> - This parameter is rarely used, as by default the navbox shows results related to the page in which it is on. In the rare circumstances where it is required to show different results, this parameter can be used. Example: On a dedicated route or history page (A5 route or A5 history), the navbox can be used to show all pages related to A5, rather than just the A5 route (there would usually be zero pages or images related to the route or history pages).

<cat> - Which template or category to show with the routebox, see below.

<nearby1> - Shows other roads in nearby places, see below.

<junctions1> - Shows other junctions in nearby places, see below.

Catnav

Many groups have articles have templates designed to ease navigation between them, for example Template:A1-A99. These templates can be included within the routebox by specifying the name in the cat= parameter, for example {{Navbox|cat=A1-A99}} is used on all the F99 pages.

If you specify a name in the cat parameter which relates to a template that doesn't exist, the Navbox will automatically try to generate a template based on the contents of the category of the same name. Example: On the page for Wiltshire (Highway Authority), the template {{Navbox|cat=Highway Authorities in South West England}} is used. There is no template by that name, so pages listed in Category:Highway Authorities in South West England are given.

It is possible to use the cat2= and cat3= parameters to use more than one template.

Nearby

In order to help in navigating between roads, the "nearby1" paramater can be included. This includes a list of other roads in or near the placename specified, by looking up the contents of the category of the same name. You can use up to 5 "nearby" parameters, such as in the following example: {{Navbox|nearby1=Wolverhampton|nearby2=Telford|nearby3=Coventry|nearby4=Birmingham|nearby5=Manchester}}

Junctions

In order to help in navigating between junctions, the "junctions1" paramater can be included. This includes a list of other roads in or near the placename specified, by looking up the contents of the category of the same name. You can use up to 5 "junctions" parameters, such as in the following example: {{Navbox|junctions1=Wolverhampton|junctions2=Telford|junctions3=Cannock|junctions4=Walsall|junctions5=Stockport}}

Result

Full Navbox

The navbox code produces the following template (as it would appear on the A38 page).


CatNav Only

If there are no related pages for the given road, only the CatNav will display, as in this example:

Junctions Only

If there are no related pages for the given road, only the junctions lists will display, as in this example:

Nearby Only

If there are no related pages for the given road, only the junctions lists will display, as in this example:


No results

If there is no related pages, no images, no catnav, no nearby and no junctions the Navbox will only display the header row.