模板:States

[阅读] [编辑]Template-info.png 模板文档
This template uses the following modules:
Module:State

This template provides a way to read the name of several states based off the ID and formats the output accordingly.

Parameters

{{State|123|noid = yes}}

Parameter Info Required Notes
1..9 integer At least one required The IDs of the state.
noid boolean Optional If true, doesn't display the ID of the state after the name.
nob boolean Optional If true, state name won't be bolded.
sep text Optional The separator string between the state names. If unspecified or blank, defaults to a comma-separated list with the last term being separated with "and" (serial comma included on 3+ items). To get around MediaWiki trimming whitespace characters at beginning or end, spaces can be represented with underscores and newlines can be represented with \n.

Usage examples

Code Result
{{States|123|321|456}} South-West England (123), Goa (321), and Aswan (456)
{{States|111|222|noid=yes|nob=yes}} Uusimaa and Orel
* Controls state {{States|333|444|555|666|sep=\n* Controls state_}}
  • Controls state North Borneo (333)
  • Controls state Baluchistan (444)
  • Controls state Kuril Islands (555)
  • Controls state Norrbotten (666)

See also