Template:Para/doc:修订间差异
无编辑摘要 |
A2093064-bot(留言 | 贡献) 機器人35:更新模板使用量為130375 |
||
(未显示3个用户的12个中间版本) | |||
第4行: | 第4行: | ||
}} |
}} |
||
{{Documentation subpage}} |
{{Documentation subpage}} |
||
{{High-use| |
{{High-use|130375}} |
||
<!-- 在本行下編輯模板說明 --> |
<!-- 在本行下編輯模板說明 --> |
||
<includeonly>{{Distinguish|Template:Paragraph break|Template:Param}}</includeonly> |
<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. |
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" |
{| class="wikitable" |
||
! 原始碼 |
|||
! Code |
|||
! |
! 結果 |
||
! |
! 備註 |
||
|- |
|- |
||
| {{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;"> </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). |
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). |
||
== |
==參見== |
||
See also the three tables below; they describe the family of approximately forty templates built for talking about templates. |
|||
Here are some related templates or subjects not found in the tables: |
|||
* {{tl|Param}} |
* {{tl|Param}} |
||
⚫ | |||
* {{tl|Parameter}} |
|||
⚫ | |||
This area creates a more user friendly gap to clearly isolate area for adding See also entries. |
|||
<includeonly>{{sandbox other|| |
<includeonly>{{sandbox other|| |
||
<!-- |
<!---本行下加入模板的分類,跨維基連結加入Wikidata(參見[[Wikipedia:Wikidata]])---> |
||
[[Category:輸入支援模板]] |
[[Category:輸入支援模板]] |
||
[[Category:格式模板]] |
[[Category:格式模板]] |
2021年2月21日 (日) 21:09的最新版本
此頁面是Template:Para的Template文档。 此頁面可能包含了模板的使用說明、分類和其他内容。 |
此Template文档被引用於約148,000個頁面。 為了避免造成大規模的影響,所有對此Template文档的編輯應先於沙盒、測試樣例或您的沙盒上測試。 測試後無誤的版本可以一次性地加入此Template文档中,但是修改前請務必於討論頁發起討論。 模板引用數量會自動更新。 |
用法
[编辑]This template is for giving examples of 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 {{para}}
parameter is empty, an unnamed example parameter.
舉例
[编辑]原始碼 | 結果 | 備註 |
---|---|---|
{{para|name}}
|
|name=
|
|
{{para|title|{{var|book title}}}}
|
|title=book title
|
|
{{para| |section}}
|
|section
|
For未命名的參數; note empty first parameter in the code |
{{para|{{var|parameter}}|{{var|value}}}}
|
|parameter=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 {{var|value}}
(as in the second example above). The same should be done for non-literal, example parameters (fourth example above).
參見
[编辑]