Πρότυπο:Τεκμηρίωση προτύπου: Διαφορά μεταξύ των αναθεωρήσεων

Μετάβαση στην πλοήγηση Πήδηση στην αναζήτηση
καμία σύνοψη επεξεργασίας
Χωρίς σύνοψη επεξεργασίας
Χωρίς σύνοψη επεξεργασίας
<!--
Automatically add {{template sandbox notice}} when on a /sandbox page.
Start of green doc box
-->{{#ifeq: {{SUBPAGENAME}} | sandbox
--><div id="template-documentation" class="template-documentation iezoomfix"><!--
| <div style="clear: both;"></div>{{template sandbox notice|{{{livepage|}}}}}
Add the heading at the top of the doc box:
}}<!--
-->{{#ifeq: {{{heading|¬}}} | <!--Defined but empty-->
Automatically add {{pp-template}} to protected templates.
| <!--"heading=", do nothing-->
-->{{pp-template}} other
| <div style="padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex;"><span style="{{#if: {{{heading-style|}}}
| {{#ifeq: {{PROTECTIONLEVEL:move}} | sysop
| {{{heading-style|}}}
| {{pp-template|docusage=yes}}
| {{#ifeq: {{SUBJECTSPACE}} | {{ns:Template}}
| {{#if: {{PROTECTIONLEVEL:edit}}
| font-weight: bold; font-size: 125%
| font{{pp-size: 150%template|docusage=yes}}
| <!--Not protected, or only semi-move-protected-->
}}
}}
}}">{{#switch: {{{heading|¬}}}
}}<!--
| ¬ =
Start of green doc box.
<!--"heading" not defined in this or previous level-->
-->{{documentation/start box2
{{#switch: {{SUBJECTSPACE}}
| preload = {{{preload|}}} <!--Allow custom preloads-->
| {{ns:Template}} = [[File:Template-info.png|50px|link=|alt=Documentation icon]] Template documentation
-->{{#ifeq:| heading = {{{heading|¬}}} | <!--DefinedEmpty but emptydefined means no header-->
| {{ns:Module}} = [[File:Template-info.png|50px|link=|alt=Documentation icon]] Module documentation
| heading-style |= {{{heading-style|}}}
| {{ns:File}} = Summary
| content #if:= {{{content|}}}
| #default = Documentation
 
}}
<!--Some namespaces must have the /doc, /sandbox and /testcases
| #default =
in talk space-->
<!--"heading" has data or is empty but defined-->
| docspace = {{documentation/docspace}}
{{{heading|}}}
 
}}</span>{{
| 1 = {{{1|}}} <!--Other docname, if fed-->
#if: {{{content|}}}
 
|
<!--The namespace is added in /start box2-->
| <!--Add the [view][edit][history][purge] or [create] links-->
| template page = {{documentation/template page}}
<span class="mw-editsection plainlinks" id="doc_editlinks">{{
 
#if: {{{doc exist|yes}}}
}}<!-- Start content --><!--
| &#91;[[{{{docpage|{{FULLPAGENAME}}/doc}}}|view]]&#93; [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=edit}} edit]] [[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}|action=history}} history]] [{{purge|purge}}]
Start load |the <!--/doc doesn't exist-->content:
Note: The line breaks between this comment and the next line are necessary
[[{{fullurl:{{{docpage|{{FULLPAGENAME}}/doc}}}| action=edit&preload={{
so "=== Headings ===" at the start and end of docs are interpreted.
#if: {{{preload|}}}
-->
| {{urlencode:{{{preload}}}}}
{{#switch: {{#if:{{{content|}}}|1|0}}{{#if:{{{1|}}}|1|0}}{{#ifexist:{{{1|}}}|1|0}}{{#ifexist:{{documentation/docspace}}:{{documentation/template page}}/doc|1|0}}
| {{#ifeq: {{SUBJECTSPACE}} | {{ns:File}}
| 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110
| Template:Documentation/preload-filespace
| 1111 = {{{headingcontent|}}}
| Template:Documentation/preload
| 0110 | 0111 = {{ {{{1}} }} }} create]]
| 0001 | 0011 = {{ {{documentation/docspace}}:{{documentation/template page}}/doc }}
}}</span>
| 0000 | 0100 | 0010 | 0101 =
}}</div>
}}
}}<noinclude><!-- close the div --></div>
<!--
End load the /doc content:
Note: The line breaks between this comment and the previous line are necessary
so "=== Headings ===" at the start and end of docs are interpreted.
-->{{documentation/end box2
| preload = {{{preload|}}} <!--Allow custom preloads-->
| content = {{{content|}}}
| link box = {{{link box|}}} <!--So "link box=off" works-->
 
<!--Some namespaces must have the /doc, /sandbox and /testcases
in talk space-->
| docspace = {{documentation/docspace}}
 
| 1 = {{{1|}}} <!--Other docname, if fed-->
 
<!--The namespace is added in /end box2-->
| template page = {{documentation/template page}}
 
}}<!--
End of green doc box
--><noinclude>
 
{{pp-template}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
0

επεξεργασίες

Μενού πλοήγησης