更改

添加2,182字节 、 2021年1月15日 (五) 23:03
已还原Uuuuuuuuuuuuuuuuueuuuuuuueuuu对话)的编辑至最后由One-Six修订的版本
第1行: 第1行:  +
{{NoteTA
 +
|G1 = IT
 +
|G2 = MediaWiki
 +
}}
 +
{{FromOther|site=中文维基百科|originURL=https://zh.wikipedia.org/wiki/{{FULLPAGENAMEE}}|origin={{FULLPAGENAME}}|copyright=cc|lsubtype=by-sa|lver=3.0|contribURL=https://zh.wikipedia.org/w/index.php?title={{FULLPAGENAMEE}}&action=history}}[[Category:从中文维基百科引入的页面]]{{Documentation subpage}}
 +
{{High-use|74658}}
 +
<!-- 在本行下編輯模板說明 -->
 +
<includeonly>{{Distinguish|Template:Paragraph break|Template:Param|Template:參數}}</includeonly>
 +
==用法==
 +
This template is for giving examples of [[Wikipedia:Template messages|template]] parameter source code (useful in template documentation and talk page discussions of template code). It must have one or two parameters itself. The first parameter is the name of the example parameter to display (this may be ''empty'', but it must be ''present''), and the second (optional) parameter is a value for the first example parameter or, if the first {{tlx|para}} parameter is empty, an unnamed example parameter.
    +
===舉例===
 +
{| class="wikitable"
 +
! 原始碼
 +
! 結果
 +
! 備註
 +
|-
 +
| {{tlx|para|name}}
 +
| {{para|name}}
 +
|
 +
|-
 +
| <code><nowiki>{{para|title|{{var|book title}}}}</nowiki></code>
 +
| {{para|title|{{var|book title}}}}
 +
|
 +
|-
 +
| {{tlx|para|2=<span style="font-size:1pt;">&nbsp;</span>|3=section}}
 +
| {{para||section}}
 +
| For[[:en:Help:Templates#Parameters|未命名的參數]]; note empty first parameter in the code
 +
|-
 +
| <code><nowiki>{{para|{{var|parameter}}|{{var|value}}}}</nowiki></code>
 +
| {{para|{{var|parameter}}|{{var|value}}}}
 +
|
 +
|}
 +
When using literal, pre-specified values, simply provide the value (as in the third example above). When illustrating hypothetical, variable, or user-definable values, use {{tlx|var|value}} (as in the second example above). The same should be done for non-literal, example parameters (fourth example above).
 +
 +
==參見==
 +
* {{tl|Param}}
 +
* {{tl|tag}}<!---, for providing a similar service, but for HTML tags.--->
 +
 +
<includeonly>{{sandbox other||
 +
<!---本行下加入模板的分類,跨維基連結加入Wikidata(參見[[Wikipedia:Wikidata]])--->
 +
[[Category:輸入支援模板]]
 +
[[Category:格式模板]]
 +
}}</includeonly>