Typecraft v2.5
Jump to: navigation, search

Difference between revisions of "Template:Documentation"

(Added a newline inside the comment, to make the code more readable (especially in lower screen resolutions).)
(hive off links to /sandbox and /testcases to subtemplate, so that same code can be used in Template:Category interwiki)
Line 36: Line 36:
 
   -->{{#ifexist: {{{1|{{Documentation/docname}}}}}
 
   -->{{#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 />
 
   |<!--**/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 />
  }}<!--
+
  }}{{Documentation/links}}<!-- Add links to /sandbox and /testcases when appropriate -->
 
+
-->{{#switch: {{SUBPAGENAME}}
+
  |sandbox|testcases=<!--**DO NOT SHOW THESE LINKS ON THE SANDBOX/TESTCASES PAGES**-->
+
  |#default=
+
    {{#switch: {{SUBJECTSPACE}}
+
    |{{ns:template}}
+
    |{{ns:user}}=
+
      {{#ifexist: {{FULLPAGENAME}}/sandbox
+
      |This template has a [[/sandbox|sandbox]] <small style="font-style: normal">([{{fullurl:{{ #rel2abs: /sandbox }}|action=edit}} edit])</small> <!--
+
        -->{{#ifexist: {{FULLPAGENAME}}/testcases
+
        |and [[/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.}}
+
}}}}}}
+
 
  </div>
 
  </div>
 
{{#if:{{{content|}}}|{{{content}}}|{{#ifexist:{{{1|{{Documentation/docname}}}}} | {{ {{{1|{{Documentation/docname}}}}} }} }}}}
 
{{#if:{{{content|}}}|{{{content}}}|{{#ifexist:{{{1|{{Documentation/docname}}}}} | {{ {{{1|{{Documentation/docname}}}}} }} }}}}

Revision as of 12:53, 10 January 2010

[create] 50px Template documentation