In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Difference between revisions of "Template:Documentation"

From WiiBrew
Jump to navigation Jump to search
m (wp import)
 
Line 1: Line 1:
<noinclude>{{mergefrom|Usage of template}}{{
+
<div class="template-documentation"><!--
#ifeq: {{SUBPAGENAME}} | sandbox
+
 
  | {{Template sandbox notice}}
+
These are the literal class definitions in common.css:
  | {{pp-semi-template|small=yes}}
+
}}
+
/* For template documentation */
{{intricate template}}
+
.template-documentation {
</noinclude><div class="template-documentation">{{
+
    clear: both;
  #if: {{{heading|Documentation}}}
+
    margin: 1em 0 0 0;
   |<div style="padding-bottom: {{{heading-padding|3px}}}; border-bottom: 1px solid #aaa; margin-bottom: {{{heading-margin|1ex}}}"><span class="editsection plainlinks" id="doc_editlinks">{{
+
    border: 1px solid #aaa;
    #ifexist: {{{1|{{Documentation/docname}}}}}
+
    background-color: #ecfcf4;
     |<!-- /doc exists -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} edit]]
+
    padding: 5px;
     |<!-- no /doc -->{{
+
}
      #if: {{{content|}}}
+
 
      |
+
 
      |<!-- no content -->[[{{fullurl:{{{1|{{Documentation/docname }}}}}|action=edit&preload={{{preload-doc|Template:Documentation/preload}}}}} create]]
+
-->{{#ifeq:{{{heading|μ}}}|<!--**DEFINED BUT EMPTY**-->
    }}
+
  |<!--**NOTHING**-->
   }}</span> <span style="{{{heading-style|font-size: 150%}}}">{{{heading|Documentation}}}</span></div>
+
   |<div style="padding-bottom:3px; border-bottom: 1px solid #aaa; margin-bottom:1ex">{{#ifeq:{{{content|μ}}}
}}<!-- endif heading -->
+
  |<span class="editsection plainlinks" id="doc_editlinks">{{#ifexist: {{{1|{{Documentation/docname}}}}}
<div id="template_doc_page_transcluded" class="dablink plainlinks">{{
+
     |<!--**    /doc EXISTS**  -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} edit]]
  #ifeq: {{{transcluded|show}}} | show
+
     |<!--**/doc DOESN'T EXIST**-->[[{{fullurl:{{{1|{{Documentation/docname }}}}}|action=edit&preload=Template:Documentation/preload}} create]]
  |<!-- transcluded show -->{{
+
  }}</span>
    #ifexist: {{{1|{{Documentation/docname}}}}}
+
   }} <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>
    |<!-- /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] &#124; [{{fullurl:{{{1|{{Documentation/docname}}}}}|action=history}} history])</small><br />
+
}}<!--
  }}
+
 
  |<!-- transcluded hide -->
+
--><div id="template_doc_page_transcluded" class="dablink plainlinks"><!--
}}{{
+
  -->{{#ifexist: {{{1|{{Documentation/docname}}}}}
  #switch: {{SUBPAGENAME}}
+
  |<!--**/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] &#124; [{{fullurl:{{{1|{{Documentation/docname}}}}}|action=history}} history])</small><br />
  |sandbox=<!-- sandbox -->
+
}}<!--
  |testcases=<!-- testcases -->
+
 
  |#default={{
+
-->{{#switch: {{SUBPAGENAME}}
    #switch: {{SUBJECTSPACE}}/{{{sandbox-testcases|show}}}
+
  |sandbox|testcases=<!--**DO NOT SHOW THESE LINKS ON THE SANDBOX/TESTCASES PAGES**-->
    | {{ns:template}}/show | {{ns:user}}/show =<!-- show /sandbox /testcases -->{{
+
  |#default=
      #ifexist: {{ #rel2abs: /sandbox }}
+
    {{#switch: {{SUBJECTSPACE}}
      | This template has a [[/sandbox|sandbox]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /sandbox }}|action=edit}} edit])</small> {{
+
    |{{ns:template}}
        #ifexist: {{ #rel2abs: /testcases }}
+
    |{{ns:user}}=
        |<!-- /sandbox AND /testcases --> and [[/testcases|testcases]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small>
+
      {{#ifexist: {{FULLPAGENAME}}/sandbox
        |<!-- /sandbox BUT no /testcases -->}} for editors to experiment.
+
      |This template has a [[/sandbox|sandbox]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /sandbox }}|action=edit}} edit])</small> <!--
      |<!-- no /sandbox -->{{
+
        -->{{#ifexist: {{FULLPAGENAME}}/testcases
        #ifexist: {{ #rel2abs: /testcases }}
+
        |and [[/testcases|testcases]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small>}} for editors to experiment.
         | This template has [[/testcases|testcases]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small> for editors to experiment.
+
      |{{#ifexist: {{FULLPAGENAME}}/testcases
        }}
+
         |This template has [[/testcases|testcases]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small> for editors to experiment.}}
    }}
+
}}}}}}
    |<!-- hide /sandbox /testcases -->
+
</div>
  }}
+
{{#if:{{{content|}}}|{{{content}}}|{{#ifexist:{{{1|{{Documentation/docname}}}}} | {{ {{{1|{{Documentation/docname}}}}} }} }}}}
}}</div>
 
{{{content|{{ {{ #ifexist: {{{1|{{Documentation/docname}}}}} | {{{1|{{Documentation/docname}}}}} | ns:0 }} }}}}}
 
 
</div>
 
</div>

Revision as of 22:53, 31 July 2008

[edit] 50px Template documentation

Usage

Use {{Documentation}} or {{Doc}} in your <noinclude> section to add a documentation section like this to your template. The documentation itself will be located on PAGENAME/doc

You can automatically get a basic starter documentation page by clicking the Create link after you have included this template in your template.

See also