Template:地区/doc:修订间差异

(Katty von Keksburg移动页面Template:State/docTemplate:地区/doc
无编辑摘要
 
第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.


输入:<code><nowiki>{{state|1}}</nowiki></code>
== 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==


输出:{{s|1}}
{| 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}}
|}


输入:<code><nowiki>{{state|Ile de France}}</nowiki></code>
== See also ==
 
* [[Template:States]]
输出<ref>顺便请注意法国的首都在地区层面是法兰西岛,而非巴黎</ref>:{{s|Ile de France}}
 
输入:<code><nowiki>{{state|黑森}}</nowiki></code>
 
输出:{{s|黑森}}

2024年5月14日 (二) 12:52的最新版本

这是Template:地区的模板文档
当直接浏览时,使用变量可能会失效,请不要使用硬编码来代替页面名或地址。
This template uses the following modules:
Module:State

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}} 科西嘉Corsica [1]
{{地区|321|noid=yes}} 果阿Goa
{{地区|231|nob=yes}} 格鲁吉亚Georgia [231]
{{地区|114514|五更琉shu|pokewiz}} 五更琉shupokewiz [114514]

See also