今天是2024年九月30日 第40周 星期一
代人,时大变了。
我们生活在大地上,但我们的梦想超越天空。
「Template:Documentation」修訂間的差異
跳至導覽
跳至搜尋
enmgp>范 |
enmgp>CFSO6459 (update test from zhmoe) |
||
第1行: | 第1行: | ||
− | <!-- | + | <div class="template-documentation" style="background: aliceblue; padding: 1em; border: 1px solid #aaa;"><!-- |
− | + | --><div class="template-documentation-header" style="padding-bottom:3px; border-bottom: 1px solid #aaa; margin-bottom:1ex"><!-- | |
− | --> | + | --><span style="font-weight: bold; font-size: 125%">{{#switch:{{NAMESPACE}} |
− | + | |{{ns:template}}=[[File:Template-info.svg|50px|link=]] 模板文档 | |
− | + | |{{ns:module}}=[[File:Template-info.svg|50px|link=]] 模块文档 | |
− | + | |{{ns:widget}}=[[File:Template-info.svg|50px|link=]] 小工具文档 | |
− | --> | + | |#default=文档 |
− | + | }}</span> <span class="editsection plainlinks" style="font-size:small;" id="doc_editlinks">{{#if:{{{content|}}}| | |
− | + | <!-- 内联文档-->[[{{fullurl:{{FULLPAGENAME}}|action=edit}} 编辑]] | |
− | + | |{{#ifexist: {{{1|{{Documentation/docname}}}}} | |
− | | {{ | + | |<!--**/doc 存在 **-->[[{{fullurl:{{{1|{{Documentation/docname}}}}}}} 查看]] [[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} 编辑]] [[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=history}} 历史]] |
− | | | + | |<!--**/doc 不存在**-->[[{{fullurl:{{{1|{{Documentation/docname }}}}}|action=edit}} 创建]] |
− | + | }} [[{{fullurl:{{FULLPAGENAME}}|action=purge}} 刷新]] | |
− | }} | + | }}</span></div><!-- |
− | + | --><div id="template_doc_page_transcluded" class="dablink plainlinks" style="font-size:84%;"><!-- | |
− | + | -->{{#if:{{{content|}}}| | |
− | + | <!-- 内联文档**--> 这个[[Wikipedia:zh:Wikipedia:模板文件頁模式|文档]]是内联文档。 | |
− | + | |{{#ifexist: {{{1|{{Documentation/docname}}}}} | |
− | + | |<!--**/doc存在**-->这个[[Wikipedia:zh:Wikipedia:模板文件頁模式|文档]][[Wikipedia:zh:Wikipedia:嵌入包含|嵌入]]自[[{{{1|{{Documentation/docname}}}}}]]。 | |
− | + | }} | |
− | | | + | }} |
− | + | </div> | |
− | + | {{#if:{{{content|}}}|{{{content}}}|{{#ifexist:{{{1|{{Documentation/docname}}}}} | {{ {{{1|{{Documentation/docname}}}}} }} }}}} | |
− | + | </div> | |
− | | | + | <noinclude>[[Category:模板页的模板]]</noinclude> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }}<!-- | ||
− | |||
− | |||
− | |||
− | --> | ||
− | {{ | ||
− | |||
− | | | ||
− | | | ||
− | | | ||
− | |||
− | }} | ||
− | <!-- | ||
− | |||
− | |||
− | |||
− | -->{{ | ||
− | |||
− | | | ||
− | | | ||
− | |||
− | < | ||
− | |||
− | | | ||
− | |||
− | | | ||
− | |||
− | |||
− | | | ||
− | |||
− | }} | ||
− | |||
− | |||
− | |||
− | < | ||
− | </noinclude> |
於 2017年5月20日 (六) 08:24 的修訂
本模板原先來自英文萌娘百科的Template:Documentation,依照 CC BY-SA 3.0 授權被引入;原始貢獻者的名字可以在這裏看到。 經過雙方編輯者的修改,本模板可能已與它的來源大不相同。 |
此頁面是Template:Documentation的Templatedocumentation。 此頁面可能包含了模板的使用說明、分類和其他內容。 |
此Templatedocumentation被引用於約20,000個頁面中。 為了避免造成大規模的影響,所有對此Templatedocumentation的編輯應先於沙盒、測試樣例或您的用戶頁上測試。 測試後無誤的版本可以一次性地加入此Templatedocumentation中,但是修改前請務必於討論頁發起討論。 |
Template:Stack 這個模板自動顯示「模板文件」框,就像你現在看到的這樣,文件框中的內容由其它頁面生成。
用法
- 在主模板中增加
<noinclude>{{Documentation}}</noinclude>
。 - 點擊「編輯」連結,它將打開/doc子頁面,並在那裏填寫文件。
- 將分類增加在/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:模板文件頁模式#分類連結。
如果文件頁包含 includeonly
或 noinclude
標籤並作為文件的一部分,請用「<
」替代「<
」。
請勿在/doc子頁面裏再掛上{{Documentation}}
,以避免出錯
重新導向
{{模板文件}}
{{Template doc}}
{{Documentation, template}}
{{Doc}}