Template:Documentation/doc:修订间差异
删除的内容 添加的内容
小无编辑摘要 |
小无编辑摘要 |
||
第1行:
{{Documentation subpage}}{{Uses Lua|Module:Documentation}}
{{tlx|Documentation}} 模板自动显示“模板文档”框,就像你现在看到的这样,文档框中的内容由其它页面生成。
== 參數及使用方法 ==
# 点击“编辑”链接,它将打开/doc子页面,并在那里填写文档。
=== 正常的/doc子页面 ===
<syntaxhighlight lang="wikitext">▼
<noinclude>{{Documentation}}</noinclude>▼
▲== 用法 ==
=== 基本语法 ===▼
▲将以下代码放在模板代码末尾的 <syntaxhighlight lang=wikitext inline><noinclude></syntaxhighlight> 之前:
▲{{Documentation}}
</noinclude>▼
</syntaxhighlight>
===
▲<syntaxhighlight lang="wikitext"><noinclude>
▲{{Documentation|Template:其他页面/doc}}
</syntaxhighlight>
===
<noinclude>{{Documentation|content=这是一个文档。}}</noinclude>▼
</syntaxhighlight>; zh-hant:<syntaxhighlight lang="wikitext">
<noinclude>{{Documentation|content=這是一個文件。}}</noinclude>
</syntaxhighlight>;}-▼
=== 有[查看][编辑]链接的内联内容 ===
▲<syntaxhighlight lang="wikitext"><noinclude>
▲{{Documentation|content=这是一个文档。}}
<
|1 = Template:模板名/doc
|content = {{Template:模板名/doc|参数}}
▲}}</noinclude>
</syntaxhighlight>
此代码应该放置在模板代码
用于模板本身的分类链接应该用 <syntaxhighlight lang=wikitext inline><includeonly> </includeonly></syntaxhighlight> 标签来添加到文档页面。
如果文档页包含 <code>includeonly</code> 或 <code>noinclude</code> 标签并作为文档的一部分,请用“<code>&lt;</code>”替代“<code><</code>”。
本模板会检查页面的保护情况,并自动放置保护图标(于顶部indicator位置)。因此使用本模板时不应再手动调用{{tl|pp}}系列模板,否则将显示重复的保护图标。
▲此代码应放在模板代码末尾,<syntaxhighlight lang=wikitext inline><noinclude></syntaxhighlight> 之前不要有多余空格(否则会出现在使用该模板的页面上)。
▲用于模板本身的分类应写在 /doc 子页面的 <syntaxhighlight lang=wikitext inline><includeonly> </includeonly></syntaxhighlight> 标签中。
▲请勿在 /doc 子页面中再次使用 {{tlx|Documentation}},以避免出错。
▲<syntaxhighlight lang="wikitext">
▲</syntaxhighlight>
== 模板数据 ==
第68行 ⟶ 第46行:
== 重定向 ==
*
*
*{{Tl|Template doc}}
*{{Tl|模板文件}}
*{{Tl|模板文档}}
<includeonly>{{Sandbox other||
| |||