ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Template:United States topic/doc - Wikipedia, the free encyclopedia

Template:United States topic/doc

From Wikipedia, the free encyclopedia

This is a documentation subpage for Template:United States topic (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.


This template allows quick creation of navigational template for groups of articles containing names of U.S. states. It uses Template:Navbox to create the navigation box.

Contents

[edit] Blank syntax

{{United States topic
<!--passed through to Template:Navbox-->
| name       =
| state      = 
| title      = 
| titlestyle =
| bodystyle  = 
| groupstyle = 
<!--specific to Template:United States topic-->
| prefix =
| suffix =
| exclude-wdc =
| exclude-ter =
| exclude-isl =
}}

[edit] Parameters

[edit] Mandatory

name
Mandatory when creating a new template (i.e. Template:Hospitals in the United States), otherwise the the "view · talk · edit" links will connect to Template:United States topic. You can enter {{subst:PAGENAME}} for this value as a shortcut.

One of the following combinations is needed to create the links:

prefix
Places text before the U.S. state name. For example: |prefix = List of airports in would create a title List of airports in the United States and a body containing state names linked to List of airports in Alabama, List of airports in Alaska, etc.
Note: in instances when only prefix is specified, the template inserts "the" between the prefix text and "United States", creating the title List of airports in the United States instead of List of airports in United States. In the body it does the same for the Northern Mariana Islands and the United States Virgin Islands.
suffix
Places text after the U.S. state name. For example: |suffix = National Guard would create a title United States National Guard and a body containing state names linked to Alabama National Guard, Alaska National Guard, etc.
prefix and suffix
Places text before and after the U.S. state name. For example: |prefix = List of and |suffix = rivers would create a title List of United States rivers and a body containing state names linked to List of Alabama rivers, List of Alaska rivers, etc.
Note: The title in this example should be replaced by using the title parameter described below.

[edit] Optional

state
A navbox with autocollapse will start out collapsed if there are two or more tables on the same page that use collapsible. If set to collapsed, the navbox will always start out in a collapsed state. If set to blank or anything other than autocollapse or collapsed, the navbox will always start out in an expanded state.
Default is: autocollapse.
title
Text that appears centered in the titlebar (the top bar). This is optional because the use of either prefix, suffix or both will automatically generate a title if the title parameter is not supplied. This parameter is not automatically wiki-linked. For example: title = [[List of rivers in the United States|Rivers in the United States]] generates the title Rivers in the United States.

[edit] Excluding groups

In some instances the District of Columbia, U.S. Territories (Insular Areas) or U.S. Minor Outlying Islands may not have their own articles on particular topics. To disable their inclusion in the template and avoid unnecessary red links, add any or all of the following parameters:

exclude-wdc
Set to any value this excludes display of the group named Federal District which links to Washington, D.C..
exclude-ter
Set to any value this excludes display of the group named Territories (Insular Areas) which links to American Samoa, Guam, etc.
exclude-isl
Set to any value this excludes display of the group named Outlying Islands which links to Baker Island, Howland Island, etc.

[edit] Adding groups and lists

Some templates may require a list of links not already included in the template. These can be specified as follows:

list5
Text or a list of links that is displayed below the state and territory links.
group5
Header text displayed in cell to left of text specified in list5.
above
A full-width cell (no group header) displayed above the template's body (between the title and U.S. state links).
below
A full-width cell (no group header) displayed below the template's body.

[edit] Change state name used in link

The link for the District of Columbia uses "Washington, D.C." and for the state of Georgia it is "Georgia (U.S. state)". The following parameters allow for substitution where the article name does not use the default

DC
Replace "Washington, D.C." in links with specified text, i.e. "District of Columbia" or "the District of Columbia".
| DC = District of Columbia
GA
Replace "Georgia (U.S. state)" in links with specified text, i.e. "Georgia".
| GA = Georgia

[edit] Styles

titlestyle
Specifies CSS values to apply to the title. One use of this is to set the background color of the title:
titlestyle = background: #0000FF;
titlestyle = background: blue;
Default is: background: #ccccff;
bodystyle
Specifies CSS values to apply to the entire template. This will not override the following {{Navbox}} default styles:
abovestyle = background:#ddddff;
belowstyle = background:#ddddff;
groupstyle = background:#ddddff; text-align:right; white-space:nowrap;
liststyle = width:100%; font-size:95%;
abovestyle
belowstyle
Specifies CSS values to apply to the cell specified via the above and below parameters. For instance:
belowstyle = border-top: #ccccff 1px solid;
Default is: background: #ddddff;
groupstyle
Specifies CSS values to apply to the cells specified via the groupn cells. This option overrides any styles that are applied to the entire table. Example:
groupstyle = background:#6AFB92; vertical-align:top;
Default is: background: #ddddff; text-align:right; white-space:nowrap;
liststyle
Specifies CSS values to apply to the cells specified via the listn cells. This option overrides any styles that are applied to the entire table. Examples:
liststyle = padding: 5px 10px 5px 10px;
Default is: width:100%; font-size:95%;

[edit] Examples

[edit] Changing the navigation box title

{{United States topic
| title  = [[History of the United States]] by political division
| prefix = History of
}}


[edit] Excluding display of federal district and minor outlying islands

This example also shows the use of the titlestyle to change the background color and the groupstyle parameters to change the background color and vertical alignment of text.

{{United States topic
| title  = [[Airports in the United States]]
| titlestyle = background: #64E986;
| groupstyle = background: #6AFB92; vertical-align: top;
| prefix = List of airports in
| exclude-wdc = y
| exclude-isl = y
}}


[edit] Adding suffix without leading space

This example also shows the use of the liststyle parameter to add some extra padding around the list, the group1 parameter to remove the "States" heading, and the GA parameter to change link from "Georgia (U.S. state)" to "Georgia".

{{United States topic
| liststyle = padding: 5px 10px 5px 10px;
| group1 =
| prefix = List of
| suffix = -related topics
| GA = Georgia
| exclude-wdc = y
| exclude-ter = y
| exclude-isl = y
}}


[edit] Adding suffix with leading space

Note the use of an underscore in place of the leading space in the suffix. This is done to accommodate the use of suffixes without a leading space, as in the previous example. A title should be specified to avoid the underscore appearing in the title. This example also uses the DC parameter to change link from "Washington, D.C." to "District of Columbia".

{{United States topic
| title  = [[Rivers in the United States]] 
| prefix = List of
| suffix = _rivers
| DC = District of Columbia
| exclude-isl = y
}}


[edit] Using a suffix without a prefix

This example also shows use of the group5 and list5 parameters to add a group and list.

{{United States topic
<!--passed through to Template: Navbox -->
| title   = [[United States National Guard|National Guard]] in the [[United States]]
| group5  = {{nowrap|[[Federal district]]<br/>and [[insular area|territories]]}}
| list5   = [[District of Columbia National Guard|District of Columbia]]{{·}} [[Puerto Rico National Guard|Puerto Rico]]{{·}} [[Virgin Islands National Guard|U.S. Virgin Islands]] 
<!-- specific to Template: United States topic -->
| suffix  = _National Guard
| GA = Georgia
| exclude-wdc = y
| exclude-ter = y
| exclude-isl = y

[edit] Creating a new template

Code used to create Template:Hospitals in the United States:

{{United States topic
<!--passed through to Template:Navbox-->
| name  = {{subst:PAGENAME}}
| title = [[List of hospitals in the United States|Hospitals in the United States]]
<!--specific to Template:United States topic-->
| prefix = List of hospitals in
| exclude-ter = y
| exclude-isl = y
}}<noinclude>
[[Category:United States topic navigational boxes|{{PAGENAME}}]]
</noinclude>

Note: {{subst:PAGENAME}} in the above example would be replaced by Hospitals in the United States when this code is saved in Template:Hospitals in the United States.

Result:

[edit] Templates implemented with United States topic

  1. Template: All-US-interest
  2. Template: AmScoutbystate
  3. Template: ClimateUS
  4. Template: FrogsAndToadsByState
  5. Template: History of slavery in the United States
  6. Template: Hospitals in the United States
  7. Template: Lists of US state agencies
  8. Template: Lists of United States airports
  9. Template: Lists of cities by U.S. state
  10. Template: Lists of colleges and universities in the United States
  11. Template: Lists of people by U.S. state
  12. Template: Lists of state forests by U.S. state
  13. Template: Lists of state parks by U.S. state
  14. Template: NGbystate
  15. Template: Politics in the United States
  16. Template: Rivers in the United States
  17. Template: Superfund sites in the United States
  18. Template: U.S. political divisions drug policy
  19. Template: U.S. political divisions electoral reform
  20. Template: U.S. political divisions geographies
  21. Template: U.S. political divisions governments
  22. Template: U.S. political divisions histories
  23. Template: U.S. state counties templates
  24. Template: U.S. state templates
  25. Template: US ANG by state
  26. Template: US ARNG by state
  27. Template: US state flags
  28. Template: US state seals
  29. Template: USPoliticalDivisions

[edit] See also

Continental navigational templates comparison
v  d  e
(topic) Africa Asia Europe North America Oceania South America
"Countries of..." {{...Africa}} {{...Asia}} {{...Europe}} {{...North America}} {{...Oceania}} {{...South America}}
"Capitals in..." {{...Africa}} {{...Asia}} {{...Europe}} {{...North America}} {{...Oceania}} {{...South America}}
"...capitals" {{African...}} {{Asian...}} {{European...}} {{North American...}} {{Oceanian...}} {{South American...}}
World {{Continents of the world}} · {{Regions of the world}} · {{List of countries by continent}}
Generator {{Africa topic}} {{Asia topic}} {{Europe topic}} {{North America topic}} {{Oceania topic}} {{South America topic}}
{{African topic}} {{Asian topic}} {{European topic}} {{North American topic}} {{Oceanian topic}} {{South American topic}}
{{Continental topic}} · {{Continent topic}} · {{Topic by country}} · {{United States topic}} · {{Caribbean topic}} · {{Southeast Asia topic}}
Redirect {{Africa}} {{Asia}} {{Europe}} {{North America}} {{Oceania}} {{South America}}



aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -