Template:Documentation: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Davidgothberg Adding automatic adding of {{template sandbox notice}} when on a /sandbox page. See talkpage section "Request". |
imported>Davidgothberg Now uses /core. Doc links now in a box below the main doc box. Link /sandbox and /testcases also when they don't exist, with (create) links with preload. See talkpage, section "Documentation/links". |
||
Line 15: | Line 15: | ||
}}<!-- |
}}<!-- |
||
Start of green doc box. |
Start of green doc box. |
||
--> |
-->{{documentation/core |
||
| heading = {{{heading|¬}}} <!--Empty but defined means no header--> |
|||
| heading-style = {{{heading-style|}}} |
|||
These are the literal class definitions in MediaWiki:Common.css: |
|||
| content = {{{content|}}} |
|||
| docpage = |
|||
/* For template documentation */ |
|||
{{#if: {{{1|}}} |
|||
.template-documentation { |
|||
| {{{1|}}} |
|||
clear: both; |
|||
| {{#switch: {{SUBPAGENAME}} |
|||
margin: 1em 0 0 0; |
|||
| sandbox |
|||
border: 1px solid #aaa; |
|||
| testcases = {{#rel2abs: ../doc }} |
|||
background-color: #ecfcf4; |
|||
| #default = {{SUBJECTPAGENAME}}/doc |
|||
padding: 1em; |
|||
}} |
|||
} |
|||
}} |
|||
| doc exist = |
|||
-->{{#ifeq:{{{heading|μ}}}|<!--**DEFINED BUT EMPTY**--> |
|||
{{#ifexist: |
|||
|<!--**NOTHING**--> |
|||
{{#if: {{{1|}}} |
|||
|<div style="padding-bottom:3px; border-bottom: 1px solid #aaa; margin-bottom:1ex">{{#ifeq:{{{content|μ}}}|μ |
|||
| {{{1|}}} |
|||
|<span class="editsection plainlinks" id="doc_editlinks">{{#ifexist: {{{1|{{Documentation/docname}}}}} |
|||
| {{#switch: {{SUBPAGENAME}} |
|||
|<!--** /doc EXISTS** -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} edit]] [{{purge|purge}}] |
|||
| sandbox |
|||
|<!--**/doc DOESN'T EXIST**-->[[{{fullurl:{{{1|{{Documentation/docname }}}}}|action=edit&preload=Template:Documentation/preload}} create]] |
|||
| testcases = {{#rel2abs: ../doc }} |
|||
}}</span> |
|||
| #default = {{SUBJECTPAGENAME}}/doc |
|||
}} <span style="{{#if:{{{heading-style|}}}|{{{heading-style}}}|{{#ifeq:{{NAMESPACE}}|{{ns:template}}|font-weight: bold; font-size: 125%|font-size: 150%}}}}">{{#if:{{{heading|}}}|{{{heading}}}|{{#ifeq:{{NAMESPACE}}|{{ns:template}}|[[Image:Template-info.svg|50px]] Template documentation|Documentation}}}}</span></div> |
|||
}} |
|||
}}<!-- |
|||
}} |
|||
| yes |
|||
--><div id="template_doc_page_transcluded" class="dablink plainlinks"><!-- |
|||
}} |
|||
-->{{#ifexist: {{{1|{{Documentation/docname}}}}} |
|||
| sandbox = |
|||
|<!--**/doc EXISTS**-->This [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from [[{{{1|{{Documentation/docname}}}}}]]. <small style="font-style: normal">([{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} edit] | [{{fullurl:{{{1|{{Documentation/docname}}}}}|action=history}} history])</small><br /> |
|||
{{#switch: {{SUBPAGENAME}} |
|||
}}{{Documentation/links}}<!-- Add links to /sandbox and /testcases when appropriate --> |
|||
| sandbox |
|||
</div> |
|||
| testcases = {{#rel2abs: ../sandbox }} |
|||
{{#if:{{{content|}}}|{{{content}}}|{{#ifexist:{{{1|{{Documentation/docname}}}}} | {{ {{{1|{{Documentation/docname}}}}} }} }}}} |
|||
| #default = {{FULLPAGENAME}}/sandbox |
|||
<div style="clear: both;"></div> |
|||
}} |
|||
⚫ | |||
| testcases = |
|||
{{#switch: {{SUBPAGENAME}} |
|||
| sandbox |
|||
| testcases = {{#rel2abs: ../testcases }} |
|||
| #default = {{FULLPAGENAME}}/testcases |
|||
}} |
|||
⚫ | |||
<!-- Add categories and interwikis to the /doc subpage, not here! --> |
<!-- Add categories and interwikis to the /doc subpage, not here! --> |
Revision as of 04:03, 6 February 2010
[create] Template documentation
Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |