(建立内容为“举例: 输入:<code><nowiki>{{state|1}}</nowiki></code> 输出:{{s|1}} 输入:<code><nowiki>{{state|Paris}}</nowiki></code> 输出:{{s|Paris}} 输…”的新页面) |
无编辑摘要 |
||
(未显示同一用户的2个中间版本) | |||
第1行: | 第1行: | ||
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}{{Lua|Module:State|nocat=1}}</noinclude><includeonly>{{Lua|Module:State}}</includeonly> | |||
This template provides a way to read the name of a state based off the ID and formats the output accordingly. | |||
== Parameters == | |||
<code><nowiki>{{ 地区|123|noid = yes}}</nowiki></code> | |||
{| class="wikitable" | |||
|- | |||
! Parameter !! Info!! Required!! Notes | |||
|- | |||
| 1 || integer ||Required||The ID of the state. | |||
|- | |||
| 2 || string ||Optional||Overrides the auto-fetched name of the state if set. | |||
|- | |||
| 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. | |||
|} | |||
== Usage examples== | |||
{| class="wikitable" | |||
! Code | |||
! style = "width:70%" | Result | |||
|- | |||
| <code><nowiki>{{地区|1}}</nowiki></code> | |||
| {{ 地区|1}} | |||
|- | |||
| <code><nowiki>{{地区|321|noid=yes}}</nowiki></code> | |||
| {{地区|321|noid=yes}} | |||
|- | |||
| <code><nowiki>{{地区|231|nob=yes}}</nowiki></code> | |||
| {{地区|231|nob=yes}} | |||
|- | |||
| <code><nowiki>{{地区|114514|五更琉shu|pokewiz}}</nowiki></code> | |||
| {{地区|114514|五更琉shu|pokewiz}} | |||
|} | |||
== See also == | |||
* [[Template:States]] | |||
2024年5月14日 (二) 12:52的最新版本
This template provides a way to read the name of a state based off the ID and formats the output accordingly.
Parameters
{{地区|123|noid = yes}}
Parameter | Info | Required | Notes |
---|---|---|---|
1 | integer | Required | The ID of the state. |
2 | string | Optional | Overrides the auto-fetched name of the state if set. |
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. |
Usage examples
Code | Result |
---|---|
{{地区|1}}
|
|
{{地区|321|noid=yes}}
|
|
{{地区|231|nob=yes}}
|
|
{{地区|114514|五更琉shu|pokewiz}}
|