Misplaced Pages

Template:US state navigation box: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 09:38, 1 April 2008 view sourceAkhtaBot (talk | contribs)10,976 editsm robot Adding: ar:قالب:صندوق التصفح للمقاطعة الأمريكية← Previous edit Latest revision as of 23:25, 10 January 2023 view source Paine Ellsworth (talk | contribs)Autopatrolled, Extended confirmed users, Page movers, File movers, New page reviewers, Pending changes reviewers, Rollbackers, Template editors256,016 edits expand template this page only 
(25 intermediate revisions by 14 users not shown)
Line 1: Line 1:
{{#invoke:navbox|navbox
<table class="navbox collapsible {{#if:{{{state|}}}|{{{state}}}|{{{collapse_state|autocollapse}}}}} nowraplinks" style="margin-top:auto; font-size:84%;">
|name = {{{template_name|<noinclude>US state navigation box</noinclude>}}}
|state = {{#if:{{{state|}}}|{{{state}}}|{{{<includeonly>collapse_state|</includeonly>autocollapse}}}}}
|border = {{{border|{{{1|}}}}}}


<tr style="color:{{{text_color|inherit}}};"> |basestyle = {{#if:{{{text_color|}}}|color:{{{text_color}}};}}{{#if:{{{color|}}}|background-color:{{{color}}};}}
<td style="width:75px; background-color:#fff; text-align:center; vertical-align:middle;">]</td>
<th style="font-weight:normal; {{#if:{{{text_color|}}}|color:{{{text_color|inherit}}};}} background:{{{color|#cddeff}}};"><!--


|title = {{{header|{{{title|{{{type}}} of {{{name}}} }}} }}}
-->{{#if:{{{template_name<includeonly>|</includeonly>}}}|
<div style="float:left; text-align:left; width:6em;">{{Tnavbar | {{{template_name|<noinclude>US state navigation box</noinclude>}}} | mini=1 | fontcolor={{{text_color|}}} }}</div>}}<!--


|bodyclass = {{{bodyclass|}}}
-->{{#if:{{{title|}}}|{{#if:{{{name|}}}|
|listclass = {{{listclass|}}}
<div style="float:left; text-align:left; width:6em;">{{Tnavbar | {{{name}}} | mini=1 | fontcolor={{{text_color|}}} }}</div>}} }}<!--
|aboveclass = {{{aboveclass|}}}
|belowclass = {{{belowclass|}}}


|above = {{#if:{{{capital<includeonly>|</includeonly>}}}|'''{{{capital}}}''' (capital)}}<!--
--><span style="font-size:150%; font-weight:bold;">{{{header|{{{title|'''{{{type}}} of {{{name}}}'''}}}}}}</span><br clear="all"><!--


-->{{#if:{{{seat|}}}|, {{{seat}}} (])}}<!--
-->{{#if:{{{capital<includeonly>|</includeonly>}}}|
'''{{{capital}}}''' (])
}}<!--


-->{{#if:{{{seat|}}}| -->{{{subtitle|}}}
, {{{seat}}} (])
}}<!--


-->{{{subtitle|}}}<!-- |below = {{{below|}}}


|imagestyle = {{{imagestyle|}}}
--></th></tr><!--
|image = {{{image|}}}


-->{{#if:{{{group1|}}}<!-- deprecated -->{{{title1<includeonly>|</includeonly>}}}| |group1 = {{{title1|{{{group1<includeonly>|</includeonly>}}} }}}
|list1 =
<tr><th style="background:{{{color|#cddeff}}}; color:{{{text_color|inherit}}}; font-size:85%; padding:2px;">{{{title1|{{{group1}}}}}}</th>
{{{list1|{{{body1<includeonly>|</includeonly>}}}}}}
<td>
{{{body1}}}
</td></tr>}}<!--


-->{{#if:{{{group2|}}}<!-- deprecated -->{{{title2<includeonly>|</includeonly>}}}|
<tr><th style="background:{{{color|#cddeff}}}; color:{{{text_color|inherit}}}; font-size:85%; padding:2px;">{{{title2|{{{group2}}}}}}</th>
<td style="background:#eee;">
{{{body2}}}
</td></tr>}}<!--


-->{{#if:{{{group3|}}}<!-- deprecated -->{{{title3<includeonly>|</includeonly>}}}| |group2 = {{{title2|{{{group2<includeonly>|</includeonly>}}} }}}
|list2 =
<tr><th style="background:{{{color|#cddeff}}}; color:{{{text_color|inherit}}}; font-size:85%; padding:2px;">{{{title3|{{{group3}}}}}}</th>
{{{list2|{{{body2<includeonly>|</includeonly>}}}}}}
<td>
{{{body3}}}
</td></tr>}}<!--


-->{{#if:{{{group4|}}}<!-- deprecated -->{{{title4<includeonly>|</includeonly>}}}| |group3 = {{{title3|{{{group3<includeonly>|</includeonly>}}} }}}
|list3 =
<tr><th style="background:{{{color|#cddeff}}}; color:{{{text_color|inherit}}}; font-size:85%; padding:2px;">{{{title4|{{{group4}}}}}}</th>
{{{list3|{{{body3<includeonly>|</includeonly>}}}}}}
<td style="background:#eee;">
{{{body4}}}
</td></tr>}}<!--


-->{{#if:{{{group5|}}}<!-- deprecated -->{{{title5<includeonly>|</includeonly>}}}| |group4 = {{{title4|{{{group4<includeonly>|</includeonly>}}} }}}
|list4 =
<tr><th style="background:{{{color|#cddeff}}}; color:{{{text_color|inherit}}}; font-size:85%; padding:2px;">{{{title5|{{{group5}}}}}}</th>
{{{list4|{{{body4<includeonly>|</includeonly>}}}}}}
<td>
{{{body5}}}
</td></tr>}}<!--


-->{{#if:{{{group6|}}}<!-- deprecated -->{{{title6<includeonly>|</includeonly>}}}| |group5 = {{{title5|{{{group5<includeonly>|</includeonly>}}} }}}
|list5 =
<tr><th style="background:{{{color|#cddeff}}}; color:{{{text_color|inherit}}}; font-size:85%; padding:2px;">{{{title6|{{{group6}}}}}}</th>
{{{list5|{{{body5<includeonly>|</includeonly>}}}}}}
<td style="background:#eee;">
{{{body6}}}
</td></tr>}}<!--


-->{{#if:{{{group7|}}}<!-- deprecated -->{{{title7<includeonly>|</includeonly>}}}| |group6 = {{{title6|{{{group6<includeonly>|</includeonly>}}} }}}
|list6 =
<tr><th style="background:{{{color|#cddeff}}}; color:{{{text_color|inherit}}}; font-size:85%; padding:2px;">{{{title7|{{{group7}}}}}}</th>
{{{list6|{{{body6<includeonly>|</includeonly>}}}}}}
<td>
{{{body7}}}
</td></tr>}}<!--


-->{{#if:{{{group8|}}}<!-- deprecated -->{{{title8<includeonly>|</includeonly>}}}| |group7 = {{{title7|{{{group7<includeonly>|</includeonly>}}} }}}
|list7 =
<tr><th style="background:{{{color|#cddeff}}}; color:{{{text_color|inherit}}}; font-size:85%; padding:2px;">{{{title8|{{{group8}}}}}}</th>
{{{list7|{{{body7<includeonly>|</includeonly>}}}}}}
<td>
{{{body8}}}
</td></tr>}}<!--


|group8 = {{{title8|{{{group8<includeonly>|</includeonly>}}} }}}
--></table><noinclude>
|list8 =
{{pp-semi-template|small=yes}}
{{{list8|{{{body8<includeonly>|</includeonly>}}}}}}


|group9 = {{{title9|{{{group9<includeonly>|</includeonly>}}} }}}
|list9 =
{{{list9|{{{body9<includeonly>|</includeonly>}}}}}}
}}<noinclude>


{{template doc}} {{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! --> <!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude> </noinclude>

]

Latest revision as of 23:25, 10 January 2023

{{{type}}} of {{{name}}}
{{{capital}}} (capital)
{{{group1}}}{{{body1}}}
{{{group2}}}{{{body2}}}
{{{group3}}}{{{body3}}}
{{{group4}}}{{{body4}}}
{{{group5}}}{{{body5}}}
{{{group6}}}{{{body6}}}
{{{group7}}}{{{body7}}}
{{{group8}}}{{{body8}}}
{{{group9}}}{{{body9}}}
Template documentation[view] [edit] [history] [purge]
WarningThis 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 and list9. 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.
color
Changes the default background color for the main title and sidebar titles, i.e.
color = #2e8b57
Working examples: {{California}}, {{Maryland}}, and {{Pennsylvania}}.
text_color
Changes the default text color for the main title and sidebar titles. Note that you will still need to manually change the color of any wikilinks using a span tag, i.e.
]
Working examples: {{Nevada}}, {{Maine}}, and {{Hawaii}}.
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

Navigation templates comparison
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
Collapsible attributes
Type CSS classes JavaScript Collapses when Custom
initial state
Nesting
Collapsible tables mw-collapsible jQuery.makeCollapsible 2 or more autocollapse on page Yes Yes
The above documentation is transcluded from Template:US state navigation box/doc. (edit | history)
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: