Navbox

From Scandia

Jump to: navigation, search

The Navbox (edit template provides the basic structure for building a navbox template for a specific purpose or set of articles. Navigation boxes provide a list of related topic articles that are often in different categories. Occasionally a navbox is used for articles all within the same category, such as a listing of the order in which heads of state served.

Contents

Usage

Navbox

Navbox is the basic navigation box template. Its features include optional symbols, such as flags or icons, at either or both end(s) of the title bar and optional images, such as a badge of office or logo, on either or both side(s) of the navigation list. The title bar and font colors are customizable using standard HTML color codes.

To use this template on a page, copy the following code and paste it at the end of the article, but before the categories listing. Be sure to replace yourinfo with your information. To accept default sizes and colors, leave those parameters blank, but to change those parameters, be sure to include an equal (=) sign.


{{Navbox
| navtitle = yourinfo
| navlist = yourinfo
<!--You may safely delete any of the following parameters you do not use-->
| navlistalign
| titlecolor
| headercolor
| symbol = yourinfo
| symbolwidth
| symbolalt = yourinfo
| symbolrt = yourinfo
| symbolwidthrt
| symbolaltrt = yourinfo
| imgleft = yourinfo
| imgleftsize = yourinfo
| imgleftalt = yourinfo
| imgright = yourinfo
| imgrightsize = yourinfo
| imgrightalt = yourinfo
<!--The following line MUST be included for your template to display properly-->
|}}


Navbox (No Images)

Navbox noimg is identical to the regular navbox template except it does not include images in the listing area. Like the regular template, it does permit optional left, right, or both, symbols or icons in the header bar and the title bar and font colors are still customizable. This template was designed to work around the fact the regular navbox template reserves the left image space even if there is no image. While that may not normally be an issue, it interferes with proper display of 2-column navigation boxes.

To use this template on a page, copy the following code and paste it at the end of the article, but before the categories listing. Be sure to replace yourinfo with your information. To accept default sizes and colors, leave those parameters blank, but to change those parameters, be sure to include an equal (=) sign.


{{Navbox noimg
| navtitle = yourinfo
| navlist = yourinfo
<!--You may safely delete any of the following parameters you do not use-->
| navlistalign
| titlecolor
| headercolor
| symbol = yourinfo
| symbolwidth
| symbolalt = yourinfo
| symbolrt = yourinfo
| symbolwidthrt
| symbolaltrt = yourinfo
<!--The following line MUST be included for your template to display properly-->
|}}


Two-Column Lists

Two-column navigation lists can easily be incorporated into navbox templates using the Navlist2col template. Although this template can be used to set up a 2-column format within any table, it is intended to be used as a subtemplate of the [[#Navbox (No Images}|Navbox noimg]] template. Also, be sure your navbox template navlistalign parameter equals left (navlistalign = left).

To use this template, copy the following code and paste it after the navlist = line in the navbox template code. Be sure to replace yourinfo with your information. Beyond Group1, the groups (categories) and listings only display if the group parameter is not blank.


{{Navlist2col
| groupwidth
| group1 = yourinfo
| list1 = yourinfo
<!--You may safely delete any of the following parameters you do not use-->
| group2 = yourinfo
| list2 = yourinfo
| group3 = yourinfo
| list3 = yourinfo
| group4 = yourinfo
| list4 = yourinfo
| group5 = yourinfo
| list5 = yourinfo
| group6 = yourinfo
| list6 = yourinfo
| group7 = yourinfo
| list7 = yourinfo
| group8 = yourinfo
| list8 = yourinfo
| group9 = yourinfo
| list9 = yourinfo
| group10 = yourinfo
| list10 = yourinfo
<!--The following line MUST be included for your template to display properly-->
|}}


Parameters

Except for the image and symbol parameters, standard wiki and external linking (double or single brackets respectively) and other text formatting can be used for all parameters. The image and symbol parameters should include only the filename, width, and alternate text for the respective parameters.

Although no parameter is mandatory, only those indicated as Optional will not display if they have no value specified. For those with a default value, do not include an equal sign or specify a value to accept the default. If you include an equal sign, you must also specify the value for the parameter to display properly.

  • navtitle—Title of the navigation box
  • navlist—Wiki links to articles included in the navigation box; the standard separator is the pipe symbol with a space either side ( | ); wiki links must be enclosed in double left ([[) and right (]]) brackets
  • navlistalign—Optional—text alignment (left, center, or right) of the navigation list; default is center
  • titlecolor—Optional—hexidecimal color for the navigation box title text; default is #000000 (black) [except if wiki linked]
  • headercolor—Optional—hexidecimal color for the title bar; default is #ccccff
  • symbol—Optional—filename of an image to use as the left-side symbol or icon in the title bar
  • symbolwidth—Optional—width of the image; default is 30 pixels (30px); generally, this parameter should be increased or decreased to make the image the same height as the title bar
  • symbolalt—Optional—text to display when a user rests their mouse over the symbol
  • symbolrt—Optional—filename of an image to use as the right-side symbol or icon in the title bar
  • symbolwidthrt—Optional—width of the image; default is 30 pixels (30px); generally, this parameter should be increased or decreased to make the image the same height as the title bar
  • symbolaltrt—Optional—text to display when a user rests their mouse over the symbol
  • imgleft—Optional—filename of an image to be displayed to the left of the navigation list
  • imgleftsize—Optional—width of the image; default is zero (0), so if an image is to be displayed, the width parameter should have a value
  • imgleftalt—Optional—text to display when a user rests their mouse over the image
  • imgright—Optional—filename of an image to be displayed to the right of the navigation list
  • imgrightsize—Optional—width of the image; default is zero (0), so if an image is to be displayed, the width parameter should have a value
  • imgrightalt—Optional—text to display when a user rests their mouse over the image
  • groupwidth—Optional—width of the column displaying the group names; default is 200px
  • group#—name of the grouping (note: # represents the number of the group, 1 up to 10)
  • list#—navigation links to articles in the grouping (note: # represents the number of the list, 1 up to 10)

Component Templates

Personal tools