求真百科歡迎當事人提供第一手真實資料,洗刷冤屈,終結網路霸凌。

變更

前往: 導覽搜尋

Template:Tl/doc

移除 1,470 位元組, 6 年前
撤销SolidBlock讨论)的版本48793860:编辑错了
{{NoteTA
| G1 = MediaWiki
}}
{{Documentation subpage}}
<!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). -->{{redirect-distinguish|Template:TI|Template:Ti}}{{#ifeq:{{FULLPAGENAME}} | Template:Tl | {{High-risk| 4160000190,000+ }} {{used in system}} }}The '''template link''' template is a simple <!-- 在本行下編輯模板說明 -->本模板可以用来创建一个到[[w:Macro (computer science)|macro模板]] 的带有大括号的链接,以便于使用者复制或查看相关[[m:Help:template|template模板]] used to display a template name as a link surrounded by braces, thus showing the template name as code rather than actually invoking it. Its primary use is in instruction and documentation where it is used to refer to a template by name without invoking it. Note that this template may be used under the name "tee-el" (tl) as well as "tee-one" (t1)— both function the same way and produce the same results (this is not true for all such visually confusing templates containing a possible 1/l mix-up: {{tl|Tla}} and {{tl|T1a}} are not interchangeable). A short example of its use is:介绍。
::== 用法 ==<code><nowikipre>{{tlTl|Example模板名稱}}</nowikipre></codepre>:which generates::{{tlTl|Example模板名稱|參數}}</pre>__TOC__* 注意:正確為小寫<code>l</code>,而非大寫<code>I</code>或數字<code>1</code>。
== TemplateData 舉例 =={{TemplateData header}}=== 目標模板無參數時 ===<templatedatapre>{"description": "This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.","params": { "1": { "label": "template name", "description": "the template name without the namespace prefix “Template:”, which is added automatically", "type": "line", "required": true tl|hideH}}}}</templatedatapre>
More complex variations are described below.{{tl|hideH}}
==Examples=目標模板只有一個參數時 ={| class="wikitable"! Code! Result! Notes|-| <code><nowiki>{{tl|Void}}</nowiki></code>| {{[[Template:Void|Void]]}}| Standard usage|-| <code><nowiki>{{tls|Example}}</nowiki></code>| {{[[Wikipedia:Substitution|subst]]:[[Template:Example|Example]]}}| For templates that should be [[Wikipedia:Substitution|substituted]]|-| <code><nowiki>{{tl2|X1}}</nowiki></code>| <code><nowiki>{{</nowiki>[[{{{LANG|}}}{{{SISTER|}}}{{ns:Template}}:X1|X1]]<nowiki>}}</nowiki></code>| This formats the link to show how it would look in code (i.e., monospace font)|-| <code><nowiki>{{tl2|sister=M:|3x}}</nowiki></code>| <code><nowiki>{{</nowiki>[[{{{LANG|}}}M:{{ns:Template}}:3x|3x]]<nowiki>}}</nowiki></code>| Same as above, for templates on another Wikimedia project (in this example, Meta)|-| <code><nowiki>{{tl2|sister=wikibooks|lang=de:|WP}}</nowiki></code>| <code><nowiki>{{</nowiki>[http://de.wikibooks.org/wiki/Vorlage:WP WP]<nowiki>}}</nowiki></code><!--––––– This is currently a fraudulent output result... the template code needs modified to work––––– per this plan, then this /doc file fixed up to match whatever the correct syntax actually is.––––– ALMOST work: [[:de:wikibooks:{{ns:template}}:WP|WP]][[de:wikibooks:{{ns:template}}:WP|WP]]--pre>| For templates on another language project|-| <code><nowiki>{{tl|1==)}}</nowiki></code>hideH| {{tl|1==)标题}}| Use the format <code><nowiki>{{tl|1=templatename}}</nowiki></codepre> if the template contains template coding characters such as {{tl|1==)}} or {{tl|1=!}}|}
== See also =={{Template-linking templatestl|hideH|标题}}
=== 目標模板有多個參數或命名參數時 ===<includeonlypre>{{#ifeq:{{SUBPAGENAME}}tl|sandboxhideH|&lt;nowiki&gt;Head=标题|FrameStyle=整个框架的格式&lt;/nowiki&gt;}}<!-- Categories go below this line, please; interwikis go to Wikidata, thank you! --/pre>[[Category:Internal template-link templates]]
{{tl|hideH|<nowiki>Head=标题|FrameStyle=整个框架的格式</nowiki>}}
 
== 重定向 ==
* {{tl|t1}},错字重定向
 
== 参见 ==
* {{tl|tls}},与本模板相似,生成的模板名称前带有“subst:”字样。
* {{tl|tlx}},与本模板相似,但可以用管道符“|”方式引入最多11个参数。
* {{tl|tnull}},与本模板相似,生成的模板名称不带链接,且可以用管道符“|”方式引入最多7个参数。
 
<includeonly>{{sandbox other||
<!-- 本行下加入模板的分類,跨維基連結加入Wikidata(參見[[Wikipedia:Wikidata]]) -->
[[Category:鏈接模板|Tl]]
[[Category:輸入支援模板|{{PAGENAME}}]]
[[bg:Шаблон:Ш]]
[[ca:Plantilla:Tl]]
[[cs:Šablona:Šablona]]
[[en:Template:Tl]]
[[eo:Ŝablono:Ŝ]]
[[es:Plantilla:Template link]]
[[fa:الگو:الگوی]]
[[fi:Malline:Malline]]
[[fr:Modèle:M]]
[[he:תבנית:תב]]
[[ka:თარგი:Tl]]
[[ko:틀:Tl]]
[[kw:Template:Viz]]
[[pl:Szablon:S]]
[[pt:Predefinição:Link para predefinição]]
[[ru:Шаблон:Tl]]
[[sl:Predloga:Tl]]
[[sv:Mall:Mall]]
[[th:แม่แบบ:Tl]]
[[uk:Шаблон:Tl]]
[[vi:Tiêu bản:Tl]]
[[zh-yue:Template:Tl]]
}}</includeonly>