跳转到内容

模板:Documentation:修订间差异

来自天灾之下:危险连接资料站
wiki>Kaedeuim
小 已从templatemanager:模板:Documentation导入1个版本:​interwiki import
wiki>Shirayuki
小 make Wikipedia links translatable!
第1行: 第1行:
<div class="" style="padding:0px 1px;clear: both;"><div class="darken" style="padding:0.5em 0.5em 0.5em 1em;">'''模板文档''' <span style="font-size: 85%;">(本页面所展示的模板范例,有时会无法出现。) &nbsp;&nbsp; [[h:Help:模板|<span class="btn btn-primary">什么是模板?</span>]]</span>&nbsp;[{{fullurl:{{FULLPAGENAME}}/doc|action=edit}} <span class="btn btn-primary">编辑]</span>&nbsp;[{{fullurl:{{FULLPAGENAME}}|action=purge}} <span class="btn btn-primary"><span title="Refresh this page">刷新</span></span>]</div> <div class="" style="background:rgba(224, 223, 223, 0.16);padding: 1em; margin: 0.5em 0;">{{
<noinclude>
    #if: {{{content|}}}
<languages/>
    | <nowiki/>
</noinclude><includeonly>{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}</includeonly><noinclude>
{{{content}}}
{{documentation|content=
    | 关于本模板:
 
       
{{Lua|Module:Documentation}}
{{
<translate><!--T:12--> This template automatically displays a documentation box like the one you are seeing now, of which the content is sometimes transcluded from another page.</translate>
      #ifexist: {{ #if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}}/doc }}
<translate><!--T:13--> It is intended for pages which are [[<tvar name=1>Special:MyLanguage/Help:Transclusion</tvar>|transcluded]] in other pages, i.e. templates, whether in the template namespace or not.</translate>
      |{{{{
 
        #ifeq: {{NAMESPACE}} | {{ns:Template}}
<translate>
        || :{{NAMESPACE:{{ #if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}} }}}}:
== Usage == <!--T:2-->
      }}{{ #if: {{{1|}}} | {{PAGENAME:{{{1}}}}} | {{PAGENAME}}/doc}} }}
 
      | :<strong class="error">这个模板暂时没有说明文档。</strong>你可以[{{fullurl:{{ #if: {{{1|}}} | {{ urlencode: {{{1}}} }} | {{FULLPAGENAMEE}}/doc }}|action=edit&preload=Template:Documentation/preload}} 创建模板文档]。{{
=== Customising display === <!--T:3-->
        #ifeq: {{NAMESPACE}} | {{ns:10}}
 
        | 在 [[h:templatemanager:{{ #if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}}/doc }}|灰机模板仓库]] 上面有大量可以复制的现成模板。      }}[[Category:Templates without documentation|{{PAGENAME}}]]
<!--T:4-->
    }}
Overrides exist to customise the output in special cases:
  }}  </div> <div class="darken" style="clear: both; padding: 0.5em; margin: 0.5em 0; font-size: 85%; text-align: right;">{{
</translate>
    #if: {{{content|}}}
* <nowiki>{{</nowiki>documentation{{!}}'''heading'''=<nowiki>}}</nowiki> - <translate><!--T:5--> change the text of the "documentation" heading.</translate> <translate><!--T:10--> If this is set to blank, the entire heading line (including the first [edit] link) will also disappear.</translate>
    | [{{fullurl:{{FULLPAGENAMEE}}|action=edit}} Edit this page]
 
    | 进入 {{
<translate>
      #ifexist: {{ #if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}}/doc }}
== Rationale == <!--T:6-->
      | [[{{ #if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}}/doc }}]]
</translate>
      | [{{fullurl:{{ #if: {{{1|}}} | {{ urlencode: {{{1}}} }} | {{FULLPAGENAMEE}}/doc }}|action=edit&preload=Template:Documentation/preload}} {{ #if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}}/doc }}]
<translate><!--T:7--> This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation and categories.</translate>
    }}}} 页面来编辑这个模板的说明文档。([[Template:Documentation|这个说明框是怎么回事]]?)<br />修改完毕后,请[{{fullurl:{{FULLPAGENAME}}|action=purge}} 刷新]上面的文本。([[h:帮助:Huiji缓存|为什么?]])</div></div><noinclude>{{优质模板|功能}}[[Category:已经本地化的模板]][[Category:huiji template]]</noinclude>
<translate><!--T:8--> It also reduces server resources by circumventing a [[w:Wikipedia:Template limits|technical limitation of templates]] (see a [[<tvar name=1>:en:Special:Diff/69888944</tvar>|developer's explanation]]).</translate>
 
<translate>
== See also == <!--T:9-->
</translate>
* <translate><!--T:14--> [[w:Template:Documentation subpage]]</translate>
* {{tim|Documentation}}
* <translate><!--T:11--> [[w:Wikipedia:Template documentation]]</translate>
 
}}
[[Category:Formatting templates{{#translation:}}|Template documentation]]
[[Category:Template documentation{{#translation:}}| ]]
</noinclude><includeonly>{{#if:{{{content|}}}|
[[Category:Template documentation pages{{#translation:}}]]
}}</includeonly>

2025年5月3日 (六) 07:13的版本


模板文档

This template automatically displays a documentation box like the one you are seeing now, of which the content is sometimes transcluded from another page. It is intended for pages which are transcluded in other pages, i.e. templates, whether in the template namespace or not.

Usage

Customising display

Overrides exist to customise the output in special cases:

  • {{documentation|heading=}} - 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.

Rationale

This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation and categories. It also reduces server resources by circumventing a technical limitation of templates (see a developer's explanation).

See also