Jump to content

Template:Documentation: Difference between revisions

From IdeaWazaWiki
wikademia>Malyctenar
I'm pretty sure people know that clicking on the blue pagename link thingy makes them see it; also no need to test SUBPAGENAME within noinclude of a single template
wikademia>Wikademia
m 121 revisions
 
(40 intermediate revisions by 24 users not shown)
Line 1: Line 1:
<noinclude>
<div class="template-documentation"><!--
{{pp-semi-template|small=yes}}
 
{{intricate}}
These are the literal class definitions in common.css:
<!-- Moved to: Template:Documentation, template
     {{Mergingfrom|Template doc|date=November 2007}}
/* For template documentation */
     [[User:ConradPino]] 21:45, 9 November 2007 (UTC)
.template-documentation {
  -->
    clear: both;
</noinclude><div class="template-documentation">{{
    margin: 1em 0 0 0;
  #if: {{{heading|Documentation}}}
     border: 1px solid #aaa;
   |<!-- has heading --><div style="padding-bottom: {{{heading-padding|3px}}}; border-bottom: 1px solid #aaa; margin-bottom: {{{heading-margin|1ex}}}"><span class="editsection plainlinks" id="doc_editlinks">{{
     background-color: #ecfcf4;
    #ifexist: {{{1|{{Documentation/docname}}}}}
    padding: 5px;
     |<!-- /doc exists -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}}} view]] [[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} edit]]
}
     |<!-- no /doc -->{{
 
      #if: {{{content|}}}
 
      |
-->{{#ifeq:{{{heading|μ}}}|<!--**DEFINED BUT EMPTY**-->
      |<!-- only if no content, then -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit&preload={{{preload-doc|Template:Documentation/preload}}}}} edit]]
   |<!--**NOTHING**-->
    }}<!-- endif content, follows endifexist /doc  -->
  |<div style="padding-bottom:3px; border-bottom: 1px solid #aaa; margin-bottom:1ex">{{#ifeq:{{{content|μ}}}|μ
   }}</span> <span style="{{{heading-style|font-size: 150%}}}">{{{heading|Documentation}}}</span></div>
  |<span class="editsection plainlinks" id="doc_editlinks">{{#ifexist: {{{1|{{Documentation/docname}}}}}
<!-- follows endif heading: if empty, all of the above is skipped -->
     |<!--**    /doc EXISTS**  -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} edit]] [{{purge|purge}}]  
}}<div id="template_doc_page_transcluded" class="dablink plainlinks">{{
     |<!--**/doc DOESN'T EXIST**-->[[{{fullurl:{{{1|{{Documentation/docname }}}}}|action=edit&preload=Template:Documentation/preload}} create]]
  #ifeq: {{{transcluded|show}}} | show
  }}</span>
  |<!-- transcluded show -->{{
   }} <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>
    #ifexist: {{{1|{{Documentation/docname}}}}}
}}<!--
    |<!-- /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 />
 
  }}<!-- endifexist /doc;
--><div id="template_doc_page_transcluded" class="dablink plainlinks"><!--
            follows
  -->{{#ifexist: {{{1|{{Documentation/docname}}}}}
  endif transcluded = show : if hide, this was skipped -->
  |<!--**/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 />
}}{{
}}<!--
  #switch: {{SUBPAGENAME}}
 
  |sandbox=<!-- sandbox -->
-->{{#switch: {{SUBPAGENAME}}
  |testcases=<!-- testcases -->
  |sandbox|testcases=<!--**DO NOT SHOW THESE LINKS ON THE SANDBOX/TESTCASES PAGES**-->
  |#default={{
  |#default=
    #switch: {{SUBJECTSPACE}}/{{{sandbox-testcases|show}}}
    {{#switch: {{SUBJECTSPACE}}
    |{{ns:template}}/show
    |{{ns:template}}
    | {{ns:user}}/show =<!-- show experiment subpages -->This template has {{
    |{{ns:user}}=
      #ifexist: {{ #rel2abs: /sandbox }}
      {{#ifexist: {{FULLPAGENAME}}/sandbox
      |<!-- /sandbox -->a [[/sandbox|sandbox]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /sandbox }}|action=edit}} edit])</small> {{
      |This template has a [[/sandbox|sandbox]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /sandbox }}|action=edit}} edit])</small> <!--
        #ifexist: {{ #rel2abs: /testcases }}
        -->{{#ifexist: {{FULLPAGENAME}}/testcases
        | and [[/testcases|testcases]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small>
        |and [[/testcases|testcases]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small>}} for editors to experiment.
        | but '''no''' [{{fullurl:{{ #rel2abs: /testcases }}|action=edit&preload={{{preload-testcases|Template:Documentation/preload/testcases}}}}} testcases]
      |{{#ifexist: {{FULLPAGENAME}}/testcases
      }}
         |This template has [[/testcases|testcases]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small> for editors to experiment.}}
      |<!-- no /sandbox -->'''no''' [{{fullurl:{{ #rel2abs: /sandbox }}|action=edit&preload={{{preload-sandbox|Template:Documentation/preload/sandbox}}}}} sandbox] {{
}}}}}}
        #ifexist: {{ #rel2abs: /testcases }}
</div>
         |<!-- no /sandbox AND /testcases -->but has [[/testcases|testcases]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /testcases }}|action=edit}} edit])</small>
{{#if:{{{content|}}}|{{{content}}}|{{#ifexist:{{{1|{{Documentation/docname}}}}} | {{ {{{1|{{Documentation/docname}}}}} }} }}}}
        |<!-- no /sandbox AND no /testcases -->and '''no''' [{{fullurl:{{ #rel2abs: /testcases }}|action=edit&preload={{{preload-testcases|Template:Documentation/preload/testcases}}}}} testcases]
<div style="clear: both;"></div>
        }}
</div><noinclude>
    }} for editors to experiment.
 
    |<!-- hide experiment subpages: follow both endcases-->
{{pp-template|small=yes}}
  }}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
}}</div>
</noinclude>
{{{content|{{ {{ #ifexist: {{{1|{{Documentation/docname}}}}} | {{{1|{{Documentation/docname}}}}} | ns:0 }} }}}}}
</div>

Latest revision as of 17:37, 20 April 2009

[create] Template documentation