Template:Documentation/doc:修订间差异
删除的内容 添加的内容
更新文档页(简体分类名) |
小 →重定向 |
||
| (未显示2个用户的4个中间版本) | |||
第1行:
{{Documentation subpage}}{{Uses Lua|Module:Documentation}}
{{tlx|Documentation}} 模板自动显示“模板文档”框,就像你现在看到的这样,文档框中的内容由其它页面生成。
== 參數及使用方法 ==
# 在主模板中增加<syntaxhighlight lang=wikitext inline><noinclude>{{Documentation}}</noinclude></syntaxhighlight>。
# 点击“编辑”链接,它将打开/doc子页面,并在那里填写文档。
# 將分類增加在/doc子頁面的<syntaxhighlight lang=wikitext inline><includeonly></includeonly></syntaxhighlight>中。
=== 正常的/doc子页面 ===
<syntaxhighlight lang="wikitext">▼
<noinclude>{{Documentation}}</noinclude>▼
▲== 用法 ==
=== 基本语法 ===▼
▲{{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><noinclude></syntaxhighlight>”之前且不加多余的空格(否则会导致使用该模板的页面上出现多余空格)。参数可以像上面这样来使用以包含任意文档页。
用于模板本身的分类链接应
如果文档页包含 <code>includeonly</code> 或 <code>noinclude</code> 标签并作为文档的一部分,请用“<code>&lt;</code>”替代“<code><</code>”。
本模板会检查页面的保护情况,并自动放置保护图标(于顶部indicator位置)。因此使用本模板时不应再手动调用{{tl|pp}}系列模板,否则将显示重复的保护图标。
{{Documentation/TemplateData}}▼
▲用于模板本身的分类应写在 /doc 子页面的 <code><includeonly></includeonly></code> 标签中。
▲请勿在 /doc 子页面中再次使用 {{tlx|Documentation}},以避免出错。
▲<syntaxhighlight lang="wikitext">
▲{{Documentation
▲</syntaxhighlight>
== 重定向 ==
*
*
*{{Tl|Template doc}}
*{{[[Template:模板文档|-{模板文档}-]]}}
<includeonly>{{Sandbox other||
| |||