今天是2024年7月3日 第27周 星期三

代人,时大变了。

我们生活在大地上,但我们的梦想超越天空。

本頁使用了標題或全文手工轉換

「Template:Documentation」修訂間的差異

出自Akarin
跳至導覽 跳至搜尋
重定向到Template:模板文件
(试写新的模板文档,以后再合并 (時間2天))
第1行: 第1行:
#REDIRECT [[Template:模板文 ]]
+
<div class="template-documentation"><!--
 +
-->{{#ifeq:{{{heading|μ}}}|<!--**赋空值**-->
 +
  |<!--** 空 **-->
 +
  |<div style="padding-bottom:3px; border-bottom: 1px solid #aaa; margin-bottom:1ex">{{#ifeq:{{{content|μ}}}|μ
 +
  |<span class="editsection plainlinks" id="doc_editlinks">{{#ifexist: {{{1|{{Documentation/docname}}}}}
 +
   |<!--**   /doc 存在**  -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} 编辑]]
 +
   |<!--**/doc 不存在**-->[[{{fullurl:{{{1|{{Documentation/docname }}}}}|action=edit&preload={{{preload|Template:Documentation/preload}}}}} 创建]]
 +
  }}</span>
 +
  }} <span style="{{#if:{{{heading-style|}}}|{{{heading-style}}}|{{#ifeq:{{NAMESPACE}}|{{ns:template}}|font-weight: bold; font-size: 125%|font-size: 150%}}}}">{{#if:{{{heading|}}}|{{{heading}}}|{{#ifeq:{{NAMESPACE}}|{{ns:template}}|[[Image:Template-info.svg|50px]]  模板文 档|文档}}}}</span></div>
 +
}}<!--
 +
 
 +
--><div id="template_doc_page_transcluded" class="dablink plainlinks"><!--
 +
  -->{{#ifexist: {{{1|{{Documentation/docname}}}}}
 +
  |<!--**/doc存在**-->这个[[Wikipedia:模板文档頁模式|文档]][[Wikipedia:嵌入包含|包含]]在[[{{{1|{{Documentation/docname}}}}}]] 中。<span style="font-size:smaller;font-style: normal;">([{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} 编辑] &#124; [{{fullurl:{{{1|{{Documentation/docname}}}}}|action=history}} 历史])</span><br />
 +
}}<!--
 +
 
 +
-->{{#switch: {{SUBPAGENAME}}
 +
  |sandbox|testcases=<!--**在SANDBOX/TESTCASES页面下不要显示这些链接(注:中文没有)**-->
 +
  |#default=
 +
   {{#switch: {{SUBJECTSPACE}}
 +
   |{{ns:template}}
 +
   |{{ns:user}}=
 +
    {{#ifexist: {{FULLPAGENAME}}/sandbox
 +
    |这个模板有[[/sandbox|沙盒]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /sandbox }}|action=edit}} 编辑])</small> <!--
 +
     -->{{#ifexist: {{FULLPAGENAME}}/testcases
 +
     |和 [[/testcases|測試案例]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} 编辑])</small>}} for editors to experiment.
 +
    |{{#ifexist: {{FULLPAGENAME}}/testcases
 +
     |这个模板有[[/testcases|測試案例]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small> 供编辑者体验。}}
 +
}}}}}}
 +
</div>
 +
{{#if:{{{content|}}}|{{{content}}}|{{#ifexist:{{{1|{{Documentation/docname}}}}} | {{ {{{1|{{Documentation/docname}}}}} }} }}}}
 +
</div>

於 2008年5月1日 (四) 03:21 的修訂

[編輯] Template-info.svg 模板文檔

Template:Stack 這個模板自動顯示「模板文件」框,就像你現在看到的這樣,文件框中的內容由其它頁面生成。

用法

  1. 在主模板中增加<noinclude>{{Documentation}}</noinclude>
  2. 點擊「編輯」連結,它將打開/doc子頁面,並在那裏填寫文件。
  3. 將分類增加在/doc子頁面的<includeonly></includeonly>中。

正常的/doc子頁面

<noinclude>{{Documentation}}</noinclude>

任意/doc子頁面

<noinclude>{{Documentation|Template:any page/doc}}</noinclude>

行內內容

<noinclude>{{Documentation|content=这是一个文档。}}</noinclude>

有[檢視][編輯]連結的行內內容

<noinclude>{{Documentation
|1 = Template:模板名/doc
|content ={{Template:模板名/doc|参数}}
}}</noinclude>

最佳用法

此代碼應該放置在模板代碼的底部「<noinclude>」之前且不加多餘的空格(否則會導致使用該模板的頁面上出現多餘空格)。參數可以像上面這樣來使用以包含任意文件頁。 用於模板本身的分類連結應該用 <includeonly> </includeonly> 標籤來添加到文件頁面。 更複雜的案例請參見 Wikipedia:模板文件頁模式#分類連結。 如果文件頁包含 includeonlynoinclude 標籤並作為文件的一部分,請用「&lt;」替代「<」。

請勿在/doc子頁面裏再掛上{{Documentation}},以避免出錯

重新導向