Template:Documentation:修订间差异
外观
创建页面,内容为“<includeonly><div class="template-documentation" style="background: aliceblue; padding: 1em; border: 1px solid #aaa; clear:both;"><!-- --><div class="template-documentation-header" style="padding-bottom:3px; border-bottom: 1px solid #aaa; margin-bottom:1ex"><!-- --><span style="font-weight: bold; font-size: 150%">{{#switch:{{NAMESPACE}}<!-- -->|{{ns:template}}=50px|link= Template Documentation<!-- -->|{{ns:module}}=File:Template-inf…” |
小无编辑摘要 |
||
| 第2行: | 第2行: | ||
--><div class="template-documentation-header" style="padding-bottom:3px; border-bottom: 1px solid #aaa; margin-bottom:1ex"><!-- | --><div class="template-documentation-header" style="padding-bottom:3px; border-bottom: 1px solid #aaa; margin-bottom:1ex"><!-- | ||
--><span style="font-weight: bold; font-size: 150%">{{#switch:{{NAMESPACE}}<!-- | --><span style="font-weight: bold; font-size: 150%">{{#switch:{{NAMESPACE}}<!-- | ||
-->|#default=Documentation}}</span><!-- | |||
-->|#default= | |||
--> <span class="editsection plainlinks" style="font-size:small;" id="doc_editlinks"><!-- | --> <span class="editsection plainlinks" style="font-size:small;" id="doc_editlinks"><!-- | ||
2025年5月3日 (六) 07:23的版本
{{#switch:Template|#default=Documentation}} {{#ifexist:Template:Documentation/doc|[View] [Edit] [History] |{{#if:|[Edit] |[Create] }}}} {{#ifeq:Template:Documentation|Template:Documentation||[Help] }}[Refresh]
{{#ifexist:Template:Documentation/doc|This document transclude from Template:Documentation/doc.|{{#if:|This is an in-line documentation.|The documentation haven't been created.}}}}
{{#if:||Template:Toc}} {{#ifexist:Template:Documentation/doc|
描述
这是一个用于创建文档的模板
用法
在这个模板的页面上
模版代码<includeonly>使用该模板将加入的列表</includeonly><noinclude>
{{doc}}</noinclude>
如果你的模板不是一个完整的 div 或 table 你可能需要在 {{doc}} 前插入关闭标签(当然,是在 noinclude 标签内部)。
最好在 {{doc}} 前添加一个换行,这有助于避免模板与前面的代码连在一起。
在模板的文档页面
通常按照下述格式:
==描述==
这个模板用来干嘛
==语法==
把 <code>{{模版名|参数}}</code> 丢到随便哪里.
==示例==
<code>{{模版|参数}}</code>
效果为
{{模版|参数}}
<includeonly>模版本身所属的任何类别</includeonly>
|{{#if:|}}}}