imported>DC |
imported>DC |
| (未顯示同一使用者於中間所作的 1 次修訂) |
| 第1行: |
第1行: |
| {{NoteTA | | {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> |
| |G1 = IT
| | <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> |
| |G2 = MediaWiki
| | </noinclude> |
| }}
| |
| {{Documentation subpage}}
| |
| {{High-use|17,000+}}
| |
| {{stack|{{Lua|Module:Documentation}}}}
| |
| <!-- 在本行下編輯模板說明 -->
| |
| 这个模板自动显示“模板-{A|zh-hans:文档;zh-hant:文件}-”框,就像你现在看到的这样。文档框中的内容由其它页面生成,
| |
| {{seealso|Wikipedia:模板文件頁模式}}
| |
| | |
| == 用法 == | |
| # 在主模板中增加<code><noinclude>{{Documentation}}</noinclude></code>。
| |
| # 点击“编辑”链接,它将打开<tt>/doc</tt>子页面,并在那里填写文档。
| |
| # 將分類增加在<tt>/doc</tt>子頁面的<code><includeonly></includeonly></code>中。
| |
| === 正常的/doc子页面 ===
| |
| <noinclude>{{{{{template-name|Documentation}}}}}</noinclude>
| |
| === 任意/doc子页面 ===
| |
| <noinclude>{{{{{template-name|Documentation}}}|Template:any page/doc}}</noinclude>
| |
| === 内联内容 ===
| |
| <noinclude>{{{{{template-name|Documentation}}}|content=这是一个文档。}}</noinclude>
| |
| === 有[查看][编辑]链接的内联内容 ===
| |
| <noinclude>{{{{{template-name|Documentation}}}
| |
| |1 = Template:模板名/doc
| |
| |content ={{Template:模板名/doc|参数}}
| |
| }}</noinclude>
| |
| | |
| === 最佳用法 ===
| |
| 此代码应该放置在模板代码的底部“<code><noinclude></code>”之前且不加多余的空格(否则会导致使用该模板的页面上出现多余空格)。参数可以像上面这样来使用以包含任意文档页。
| |
| 用于模板本身的分类链接应该用 <code><includeonly> </includeonly></code> 标签来添加到文档页面。
| |
| 更复杂的案例请参见 [[Wikipedia:模板文件頁模式#分类链接]]。
| |
| 如果文档页包含 <code>includeonly</code> 或 <code>noinclude</code> 标签并作为文档的一部分,请用“<code>&lt;</code>”替代“<code><</code>”。
| |
| | |
| 請勿在/doc子頁面裡再掛上{{tlx|Documentation}},以避免出錯
| |
| | |
| === 自定义显示 ===
| |
| 替换这些值可以实现特殊的输出效果:
| |
| * <code>{{documentation| '''heading''' = ...}}</code> − 改变“文档”页的标题文字。如果此处留空,整个标题行(包括第一个[编辑]链接)也将隐藏。
| |
| | |
| == 重定向 ==
| |
| * {{tlx|模板文档}}
| |
| * {{tlx|Template doc}}
| |
| * {{tlx|Documentation, template}}
| |
| * {{tlx|Doc}}
| |
| | |
| <includeonly>{{sandbox other||
| |
| <!-- 本行下加入模板的分類,跨維基連結加入Wikidata(參見[[Wikipedia:Wikidata]]) -->
| |
| [[Category:模板頁的模板]]
| |
| }}</includeonly>
| |