◆少前百科是非盈利性、非官方的少女前线维基百科。
◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科
◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科
◆To foreigners,You can use twitter to contact us.
Icon Nyto Silver.png

“模板:Documentation”的版本间的差异

来自少前百科GFwiki
跳转至: 导航搜索
Fdcn讨论
第4行: 第4行:
 
   |<div style="padding-bottom:3px; border-bottom: 1px solid #aaa; margin-bottom:1ex">{{#ifeq:{{{content|μ}}}|μ
 
   |<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}}}}}
 
   |<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}} 編輯]]
     |<!--**/doc 不存在**-->[[{{fullurl:{{{1|{{Documentation/docname }}}}}|action=edit&preload={{{preload|Template:Documentation/preload}}}}} 创建]]
+
     |<!--**/doc 不存在**-->[[{{fullurl:{{{1|{{Documentation/docname }}}}}|action=edit&preload={{{preload|Template:Documentation/preload}}}}} 創建]]
 
   }}</span>
 
   }}</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>
 
   }} <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>
第12行: 第12行:
 
  --><div id="template_doc_page_transcluded" class="dablink plainlinks"><!--
 
  --><div id="template_doc_page_transcluded" class="dablink plainlinks"><!--
 
   -->{{#ifexist: {{{1|{{Documentation/docname}}}}}
 
   -->{{#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 />
+
   |<!--**/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 />
 
  }}<!--
 
  }}<!--
  
第22行: 第22行:
 
     |{{ns:user}}=
 
     |{{ns:user}}=
 
       {{#ifexist: {{FULLPAGENAME}}/sandbox
 
       {{#ifexist: {{FULLPAGENAME}}/sandbox
       |这个模板有[[/sandbox|沙盒]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /sandbox }}|action=edit}} 编辑])</small> <!--
+
       |这个模板有[[/sandbox|沙盒]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /sandbox }}|action=edit}} 編輯])</small> <!--
 
         -->{{#ifexist: {{FULLPAGENAME}}/testcases
 
         -->{{#ifexist: {{FULLPAGENAME}}/testcases
         |和 [[/testcases|測試案例]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} 编辑])</small>}} for editors to experiment.
+
         |和 [[/testcases|測試案例]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} 編輯])</small>}} for editors to experiment.
 
       |{{#ifexist: {{FULLPAGENAME}}/testcases
 
       |{{#ifexist: {{FULLPAGENAME}}/testcases
         |这个模板有[[/testcases|測試案例]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small> 供编辑者体验。}}
+
         |这个模板有[[/testcases|測試案例]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} 編輯])</small> 供编辑者試驗。}}
 
  }}}}}}
 
  }}}}}}
 
  </div>
 
  </div>
 
{{#if:{{{content|}}}|{{{content}}}|{{#ifexist:{{{1|{{Documentation/docname}}}}} | {{ {{{1|{{Documentation/docname}}}}} }} }}}}
 
{{#if:{{{content|}}}|{{{content}}}|{{#ifexist:{{{1|{{Documentation/docname}}}}} | {{ {{{1|{{Documentation/docname}}}}} }} }}}}
 
</div>
 
</div>

2008年5月1日 (四) 17:12的版本

[編輯] 50px 模板文档

Template:Documentation既可以嵌入/doc子页面,也可以用来进行内联嵌入,同时会将有一定的样式来标记这是文档页。

使用Template:Documentation能够将模板及其页面分离,从而避免内联文档的缺点。

使用方法及其简单,仅需在模板的最后加入<noinclude>{{Documentation}}</noinclude>即可,然后在模板下方就会出现文档内容。

点击创建就能在/doc子页面中创建所需的文档。创建完以后模板页就会自动包含这个文档。

虽然不推荐内联文档,但是对于一些短小的文档,内联的确更加方便。这时候可以使用该模板的content属性:

<noinclude>{{Documentation|content=
内联文档
}}</noinclude>


注意,請確保<noinclude>的開頭,接在模板原始碼或文字的最後一行後方,不要新起一行。否則,一個多餘的新行會被插入到包含该模板的頁面中,往往該頁面不需要這個新行。

  • 參數1默認值是模板:Documentation/doc。
  • 參數content默認值為空。

分类

  • 要将模板本身置于一个分类中,如果该文档具有/doc子页面,请在/doc子页面上的 <includeonly>...</includeonly> 段落中添加分类。若没有/doc子页面,请在模板页上的 <noinclude>...</noinclude> 段落中添加分类。模板的分类参见Category:页面模板
  • 要将 /doc 子页面置于一个分类中,请在 /doc 子页面上的 <noinclude>...</noinclude> 段落中添加分类。文档子頁面的分類應該只有Category:模板說明文件