Template:Documentation: Difference between revisions

From Open Food Facts wiki
(fork from https://www.wikidata.org/wiki/Template:Documentation)
Β 
No edit summary
Β 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<!--
{{Delete}}
Β  Automatically add {{template sandbox notice}} when on a /sandbox page.
-->{{#ifeq: {{SUBPAGENAME}} | sandbox
| <div style="clear: both;"></div>{{template sandbox notice|{{{livepage|}}}}}
}}<!--
Β  Automatically add {{pp-template}} to protected templates.
-->{{template other
| {{#ifeq: {{PROTECTIONLEVEL:move}} | sysop
Β  | {{pp-template|docusage=yes}}
Β  | {{#if: {{PROTECTIONLEVEL:edit}}
Β  Β  | {{pp-template|docusage=yes}}
Β  Β  | <!--Not protected, or only semi-move-protected-->
Β  Β  }}
Β  }}
}}<!--
Β  Start of green doc box.
-->{{documentation/start box2
| preload = {{{preload|}}}Β  <!--Allow custom preloads-->
| heading = {{{heading|Β¬}}}Β  <!--Empty but defined means no header-->
| heading-style = {{{heading-style|}}}
| content = {{{content|}}}
Β 
<!--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 /start box2-->
| template page = {{documentation/template page}}
Β 
}}<!-- Start content --><!--
Β  Start load the /doc content:
Β  Note: The line breaks between this comment and the next line are necessary
Β  soΒ  "=== Headings ===" at the start and end of docs are interpreted.
-->
{{#switch: {{#if:{{{content|}}}|1|0}}{{#if:{{{1|}}}|1|0}}{{#ifexist:{{{1|}}}|1|0}}{{#ifexist:{{documentation/docspace}}:{{documentation/template page}}/doc|1|0}}
| 1000 | 1001 | 1010 | 1011 | 1100 | 1101 | 1110
| 1111 = {{{content|}}}
| 0110 | 0111 = {{ {{{1}}} }}
| 0001 | 0011 = {{ {{documentation/docspace}}:{{documentation/template page}}/doc }}
| 0000 | 0100 | 0010 | 0101 =
}}
<!--
Β  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
--><includeonly>{{#ifexist:{{#titleparts:{{FULLPAGENAME}}|1}}/doc
|
|[[Category:Templates without documentation]]
}}</includeonly><!--
Β  Maintenance category for templates containing the documentation template
Β  but without having an associated documentation page
--><noinclude>
Β 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>

Latest revision as of 09:52, 12 April 2024