Cithakan:Amérika Sarékat/doc
Artikel iki durung utawa lagi dipertal sapérangan saka Wikipédia Inggris. Sampéyan kena mbiyantu Wikipédia nglanjutaké mertal. Tiliki paugeran panjarwa kanggo artikel Wikipédia. |
This template allows quick creation of navigational template for groups of articles containing names of U.S. states. It uses Template:Navbox generic to create the navigation box.
Blank syntax
[besut sumber]{{United States topic <!-- passed through to Template:Navbox generic --> |name = |state = |title_style = background: |title = |style = |group_style = <!-- specific to Template:United States topic --> |prefix = |suffix = |exclude-wdc = |exclude-ter = |exclude-isl = }}
Parameters
[besut sumber]Mandatory
[besut sumber]- 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.
Optional
[besut sumber]- 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 tocollapsed
, the navbox will always start out in a collapsed state. If set to blank or anything other thanautocollapse
orcollapsed
, the navbox will always start out in an expanded state. - Default is:
autocollapse
.
- title_style = background:
- (or titlebkg = ) Background color for the title. Use of this parameter is discouraged. Where it is used, care and consensus are needed as multiple navigational templates on one page with different titlebar colors will probably look unpleasant.
- Default is background:#ccccff .
- 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.
- style
- Specifies CSS values to apply to the template. For instance:
text-align:[right|center|left|justified]; width:(em, %, px, auto); float:[left|right|none]; clear:[right|left|both|none]; margin:
...etc.
- This option should be used sparingly as it can lead to visual inconsistencies.
- Default is:
text-align:left;
- group_style
- Specifies CSS values to apply to the "group" cells. For instance:
background:#nnnnnn; text-align:[left|center|right]; vertical-align:[top|middle|bottom]
...etc.
- This option overrides any styles that are applied to the entire table.
- Default is:
text-align:center;
Excluding groups
[besut sumber]In some instances the District of Columbia, U.S. Territories 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 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.
Examples
[besut sumber]Changing the navigation box title
[besut sumber]{{Amerika Serikat |prefix = History of |title = [[History of the United States]] by political division }}
Exclude display of federal district, territories or minor outlying islands
[besut sumber]{{Amerika Serikat |prefix = List of airports in |title = [[Airports in the United States]] |exclude-wdc=y |exclude-isl=y }}
{{Amerika Serikat |prefix = List of hospitals in |exclude-ter = y |exclude-isl = y }}
Creating a new template
[besut sumber]Code used to create Template:Hospitals in the United States:
{{Amerika Serikat <!-- passed through to Template: Navbox generic --> | 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: Cithakan:Amerika Serikat
Templates implemented with United States topic
[besut sumber]- Template: All-US-interest
- Template: AmScoutbystate
- Template: History of slavery in the United States
- Template: Hospitals in the United States
- Template: List of United States airports
- Template: Lists of people by U.S. state
- Template: NGbystate
- Template: Politics in the United States
- Template: Rivers in the United States
- Template: U.S. political divisions histories
- Template: US ANG by state
- Template: US ARNG by state
- Template: US state seals
- Template: USPoliticalDivisions