Template:Navbox/doc: Difference between revisions

From NPOWiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 9: Line 9:
*'''state''' - (optional) use this to change the default state of the navbox - "collapsed" or "expanded". The default is expanded. This parameter should usually be passed through ( <code><nowiki>|state = {{{state|}}}</nowiki></code> ) so that the state can be changed on individual pages if necessary.
*'''state''' - (optional) use this to change the default state of the navbox - "collapsed" or "expanded". The default is expanded. This parameter should usually be passed through ( <code><nowiki>|state = {{{state|}}}</nowiki></code> ) so that the state can be changed on individual pages if necessary.
*'''title''' - the heading of the navbox.
*'''title''' - the heading of the navbox.
*'''group1''' through '''group9''' - the heading to use for each group of links. These are all optional; if omitted, the list parameters will be centered in the navbox, which can be useful for particular types of navboxes. Each defined heading requires an accompanying list. You cannot mix rows with and without headings.
*'''group1''' through '''group15''' - the heading to use for each group of links. These are all optional; if omitted, the list parameters will be centered in the navbox, which can be useful for particular types of navboxes. Each defined heading requires an accompanying list. You cannot mix rows with and without headings.
*'''list1''' through '''list9''' - the content for each group. Usually you will want to use {{t|list}} with the default settings to create a bullet-separated list. You can use lists without headings, but you cannot mix rows with and without headings. At least one list is required.
*'''list1''' through '''list15''' - the content for each group. Usually you will want to use {{t|list}} with the default settings to create a bullet-separated list. You can use lists without headings, but you cannot mix rows with and without headings. At least one list is required.
*'''links''' - (optional) any additional links to display in the navbox footer, before the specific links in parameters below. Usually you will want to use {{t|list}} with the default settings to create a bullet-separated list consistent with the other links (not necessary if only including one link).
*'''links''' - (optional) any additional links to display in the navbox footer, before the specific links in parameters below. Usually you will want to use {{t|list}} with the default settings to create a bullet-separated list consistent with the other links (not necessary if only including one link).
*'''portal''' - (optional) the title of the portal page for this topic (not including "Portal:").
*'''portal''' - (optional) the title of the portal page for this topic (not including "Portal:").

Revision as of 07:56, 9 July 2021

This page contains the documentation for Template:Navbox. It includes information about the template, such as usage and categories, and is not displayed when using the template itself.

This template is used to display a box containing various links related to a particular subject. It is meant to be used by other templates that are then used on pages, rather than using this one directly. A list of navboxes can be found here. Navboxes should be placed at the bottom of a page, below everything else.

To create documentation for a navbox implementation, use Template:Navbox/box doc.

Parameters

  • style - (optional) any styling to be applied to the navbox, such as width. Use sparingly; most styling should be in site CSS. This is put directly in the style attribute.
  • state - (optional) use this to change the default state of the navbox - "collapsed" or "expanded". The default is expanded. This parameter should usually be passed through ( |state = {{{state|}}} ) so that the state can be changed on individual pages if necessary.
  • title - the heading of the navbox.
  • group1 through group15 - the heading to use for each group of links. These are all optional; if omitted, the list parameters will be centered in the navbox, which can be useful for particular types of navboxes. Each defined heading requires an accompanying list. You cannot mix rows with and without headings.
  • list1 through list15 - the content for each group. Usually you will want to use {{list}} with the default settings to create a bullet-separated list. You can use lists without headings, but you cannot mix rows with and without headings. At least one list is required.
  • links - (optional) any additional links to display in the navbox footer, before the specific links in parameters below. Usually you will want to use {{list}} with the default settings to create a bullet-separated list consistent with the other links (not necessary if only including one link).
  • portal - (optional) the title of the portal page for this topic (not including "Portal:").
  • category - (optional) the title of the category specific to this topic.
  • template (required) - the title of the navbox template using this template. This is used to create the view/edit link, so it must be correct.

Skeleton

You can start a navbox template with this general skeleton. You should delete any unused group/link sets. Don't forget to use {{list}} for the list parameters.

{{Navbox
|title = 
|state = {{{state|}}}
|group1 = 
|list1 = 
|group2 = 
|list2 = 
|group3 = 
|list3 = 
|group4 = 
|list4 = 
|group5 = 
|list5 = 
|group6 = 
|list6 = 
|group7 = 
|list7 = 
|group8 = 
|list8 = 
|group9 = 
|list9 = 
|links = 
|portal = 
|category = 
|template = {{subst:PAGENAME}}
}}<noinclude>{{documentation}}</noinclude>