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

變更

前往: 導覽搜尋

Template:Documentation/doc

移除 74 位元組, 6 年前
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->__NOTOC__{{NoteTA| G1 = MediaWiki}}
{{Documentation subpage}}
This template automatically displays a documentation box like you are seeing now{{High-use|16, of which the content is transcluded from another page. It is intended for pages which are [[w000+}}{{stack|{{Lua|Module:Documentation}}}}<!-- 在本行下編輯模板說明 -->这个模板自动显示“模板-{A|zh-hans:文档;zh-hant:文件}-”框,就像你现在看到的这样。文档框中的内容由其它页面生成,{{seealso|Wikipedia:Transclusion|transcluded]] in other pages, i.e. templates, whether in the template namespace or not. 模板文件頁模式}}
== Usage 用法 ==# 在主模板中增加<code>&lt;noinclude&gt;&#123;{Documentation}&#125;&lt;/noinclude&gt;</code>。# 点击“编辑”链接,它将打开<tt>/doc</tt>子页面,并在那里填写文档。# 將分類增加在<tt>/doc</tt>子頁面的<code>&lt;includeonly&gt;&lt;/includeonly&gt;</code>中。=== Normal 正常的/doc 子页面 ===
&lt;noinclude&gt;&#123;&#123;{{{template-name|Documentation}}}&#125;&#125;&lt;/noinclude&gt;
 === Any 任意/doc page 子页面 ===
&lt;noinclude&gt;&#123;&#123;{{{template-name|Documentation}}}|Template:any page/doc&#125;&#125;&lt;/noinclude&gt;
 === In-line content 内联内容 === &lt;noinclude&gt;&#123;&#123;{{{template-name|Documentation}}}|content=This is documentation.这是一个文档。&#125;&#125;&lt;/noinclude&gt; === In-line content with [view查看][edit编辑] links 链接的内联内容 ===
&lt;noinclude&gt;&#123;&#123;{{{template-name|Documentation}}}
|1 = Template:any page模板名/doc |content =&#123;&#123;Template:any page模板名/doc|parameters参数}}
}}&lt;/noinclude>
=== Best practice 最佳用法 ===This code should be added at the bottom of the template code, with no extra space before "此代码应该放置在模板代码的底部“<code>&lt;noinclude></code>" (which would cause extra space on pages where the template is used). The parameter can be used as shown above to transclude an arbitrary documentation page.”之前且不加多余的空格(否则会导致使用该模板的页面上出现多余空格)。参数可以像上面这样来使用以包含任意文档页。 Categories and interwiki links that apply to the template itself should be added to the documentation page, inside 用于模板本身的分类链接应该用 <code>&lt;includeonly> &lt;/includeonly></code> tags. For more complex cases, see 标签来添加到文档页面。更复杂的案例请参见 [[w:Wikipedia:Template documentation模板文件頁模式#Categories and interwiki links分类链接]]. If the documentation page contains 如果文档页包含 <code>includeonly or </code> 或 <code>noinclude tags as part of the documentation, replace the "<" with "/code> 标签并作为文档的一部分,请用“<code>&amp;lt;". === Customizing display ===Overrides exist to customize the output in special cases:* </code>”替代“<code>{&#123;documentation| '''heading''' = ...}}<</code> − change the text of the "documentation" heading. If this is set to blank, the entire heading line (including the first [edit] link) will also disappear.”。
== Functions ==If the documentation page doesn't exist, the "edit" link includes a [[mw:Manual:Creating pages with preloaded text請勿在/doc子頁面裡再掛上{{tl|preload]] parameter so that clicking it will pre-fill the edit form with the basic documentation page format.Documentation}},以避免出錯
== Rationale =自定义显示 ===替换这些值可以实现特殊的输出效果:Use of this template allows templates to be [* <code>{&#123;documentation| '''heading''' = ...}}</code> − 改变“文档”页的标题文字。如果此处留空,整个标题行(包括第一个[w:Wikipedia:Protection policy|protected编辑]] where necessary, while allowing anyone to edit the documentation, categories, and interwiki links.链接)也将隐藏。
<!--== See also 重定向 ==* {{tl|模板文档}} = {{tl|Template doc}} = {{tl|Documentation/doc/see also, template}} = {{tl|Doc}}-->
<includeonly>{{sandbox other||<!-- CATEGORIES AND INTERWIKIS HERE, THANKS 本行下加入模板的分類,跨維基連結加入Wikidata(參見[[Wikipedia:Wikidata]]) -->[[Category:Template documentation| 模板頁的模板]]}}</includeonly>