Revision as of 23:22, 5 October 2007 view sourceCapitalR (talk | contribs)Extended confirmed users43,863 edits fixing centering problem with title by changing floating spans to divs← Previous edit | Revision as of 16:25, 10 December 2007 view source Patrick (talk | contribs)Edit filter managers, Administrators68,523 edits add 8thNext edit → | ||
Line 65: | Line 65: | ||
<td> | <td> | ||
{{{body7}}} | {{{body7}}} | ||
</td></tr>}}<!-- | |||
-->{{#if:{{{group8|}}}<!-- deprecated -->{{{title8<includeonly>|</includeonly>}}}| | |||
<tr><th style="background:{{{color|#cddeff}}}; color:{{{text_color|inherit}}}; font-size:85%; padding:2px;">{{{title8|{{{group8}}}}}}</th> | |||
<td> | |||
{{{body8}}} | |||
</td></tr>}}<!-- | </td></tr>}}<!-- | ||
Revision as of 16:25, 10 December 2007
] | {{{type}}} of {{{name}}} {{{capital}}} (capital) |
---|---|
{{{group1}}} |
{{{body1}}} |
{{{group2}}} |
{{{body2}}} |
{{{group3}}} |
{{{body3}}} |
{{{group4}}} |
{{{body4}}} |
{{{group5}}} |
{{{body5}}} |
{{{group6}}} |
{{{body6}}} |
{{{group7}}} |
{{{body7}}} |
{{{group8}}} |
{{{body8}}} |
This template is used on approximately 16,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
{{US state navigation box}} is a meta-template used for each U.S. state, territory, and the District of Columbia navbox.
Usage
{{US state navigation box | template_name = {{subst:PAGENAME}} <!-- required --> | title = <!-- required --> | state = | color = | text_color = | capital = | seat = | subtitle = | image = | group1 = <!-- required, can use up to |group9= --> | body1 = <!-- required, can use up to |body9= --> }}
Parameters
Mandatory
- template_name
- The name of the template, which is needed for the "view • talk • edit" links to work properly on all of the pages where the template is used on. You can enter
{{subst:PAGENAME}}
for this value as a shortcut.
- title
- Combines the {{{type}}} and {{{name}}} parameters.
- groupn
- Subtitle to appear at the left of each bodyn
- bodyn
- There are a total of 9 group/list pairs, so you can use up to
group9
andlist9
. Additional items can easily be added to the template if needed.
Optional
- state
autocollapse
: (default) the navigation box will start out expanded unless there are two or more collapsible tables on the same page.expanded
: always starts out in an uncollapsed state.collapsed
: the navigation box will always start out in a collapsed state.
- state
- color
- Changes the default background color for the main title and sidebar titles, i.e.
color = #2e8b57
- Working examples: {{California}}, {{Maryland}}, and {{Pennsylvania}}.
- capital
- Lists the capital below the state
- seat
- Used for the seat of government for {{American Samoa}}.
- subtitle
- Used only on {{District of Columbia}} to say "Capital of the United States" since D.C. has no capital.
- image
- Adds an image to the right of the body area. Use only if there is a lot of extra whitespace at the right side of the body area. It is recommended to use a map to fill the space, similar to Template:US county navigation box. Example:
image = ]
Example
Code
{{US state navigation box | template_name = {{subst:PAGENAME}} | title = ] of ] | state = {{{state<includeonly>|uncollapsed</includeonly>}}} | capital = ] | listclass = hlist | group1 = ] | body1 = * ] * ] * ] * ... | group2 = ] | body2 = * ] * ] * ] * ... | group3 = ] | body3 = * ]/]/] * ] * ]/] * ... }}
Result
] | State of New York Albany (capital) |
---|---|
Topics | |
Regions | |
Metro areas |
See also
Template | Collapsible | Image | Groups | Style (body) parameter/s |
---|---|---|---|---|
{{Navbox}} | collapsible | Left/right of body | Yes | Yes |
{{Navbox with collapsible groups}} | collapsible | Left/right of body and/or in each list | Yes | Yes |
{{Navbox with columns}} | collapsible | Left/right of columns | No | Yes |
Type | CSS classes | JavaScript | Collapses when | Custom initial state |
Nesting |
---|---|---|---|---|---|
Collapsible tables | mw-collapsible | jQuery.makeCollapsible | 2 or more autocollapse on page | Yes | Yes |
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template. Categories: