Template:Documentation: Difference between revisions

From BoyWiki
Keeper (talk | contribs)
New page: <div class="template-documentation"><!-- These are the literal class definitions in common.css: →‎For template documentation: .template-documentation { clear: both; margin: 1...
 
No edit summary
Line 1: Line 1:
<div class="template-documentation"><!--
<div style="clear: both; border: 1px solid black; margin: 1em;">
 
  <div style="background: #ddd; color: #111; padding: 1em; margin: 0;">'''Template documentation''' <span style="font-size: 85%;">(for the above template, sometimes hidden or invisible)</span></div>
These are the literal class definitions in common.css:
   <div style="padding: 1em; padding-bottom: 0; margin: 0;">{{
    #if: {{{content|}}}
/* For template documentation */
    | <nowiki/>
.template-documentation {
{{{content}}}
    clear: both;
     | {{
    margin: 1em 0 0 0;
      #ifexist: {{ #if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}}/doc }}
    border: 1px solid #aaa;  
      | {{tocright}}{{{{
    background-color: #ecfcf4;  
        #ifeq: {{NAMESPACE}} | {{ns:Template}}
    padding: 5px;
        || :{{NAMESPACE:{{ #if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}} }}}}:
}
      }}{{ #if: {{{1|}}} | {{PAGENAME:{{{1}}}}} | {{PAGENAME}}/doc}} }}
 
      | :<strong class="error">This template doesn't have any documentation yet!</strong> Help out by [{{fullurl:{{ #if: {{{1|}}} | {{ urlencode: {{{1}}} }} | {{FULLPAGENAMEE}}/doc }}|action=edit&preload=Template:Documentation/preload}} writing some]. {{
 
        #ifeq: {{NAMESPACE}} | {{ns:10}}
-->{{#ifeq:{{{heading|μ}}}|<!--**DEFINED BUT EMPTY**-->
        | There may also be documentation on [[w:c:templates:{{ #if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}}/doc }}|Wikia Templates]] which can be copied.
  |<!--**NOTHING**-->
      }}[[Category:Templates without documentation|{{PAGENAME}}]]
   |<div style="padding-bottom:3px; border-bottom: 1px solid #aaa; margin-bottom:1ex">{{#ifeq:{{{content|μ}}}
    }}
  |<span class="editsection plainlinks" id="doc_editlinks">{{#ifexist: {{{1|{{Documentation/docname}}}}}
  }}
     |<!--**    /doc EXISTS**  -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} edit]]
  </div>
    |<!--**/doc DOESN'T EXIST**-->[[{{fullurl:{{{1|{{Documentation/docname }}}}}|action=edit&preload=Template:Documentation/preload}} create]]
  <div style="clear: both; background: #ddd; color: #111; padding: 0.5em; margin: 0; font-size: 85%; text-align: right;">{{
  }}</span>
    #if: {{{content|}}}
  }} <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>
    | [{{fullurl:{{FULLPAGENAMEE}}|action=edit}} Edit this page]
}}<!--
    | Visit {{
 
      #ifexist: {{ #if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}}/doc }}
--><div id="template_doc_page_transcluded" class="dablink plainlinks"><!--
      | [[{{ #if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}}/doc }}]]
  -->{{#ifexist: {{{1|{{Documentation/docname}}}}}
      | [{{fullurl:{{ #if: {{{1|}}} | {{ urlencode: {{{1}}} }} | {{FULLPAGENAMEE}}/doc }}|action=edit&preload=Template:Documentation/preload}} {{ #if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}}/doc }}]
  |<!--**/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 />
    }}
}}<!--
  }} to change this text! ([[Template:Documentation|How does this work]]?)<br />Done making changes? [{{fullurl:{{FULLPAGENAME}}|action=purge}} Refresh] this text! ([[Help:Purge|Why?]])</div>
 
</div>
-->{{#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>
{{#if:{{{content|}}}|{{{content}}}|{{#ifexist:{{{1|{{Documentation/docname}}}}} | {{ {{{1|{{Documentation/docname}}}}} }} }}}}
</div><noinclude>
 
{{pp-template|small=yes}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>

Revision as of 12:58, 8 December 2012

Template documentation (for the above template, sometimes hidden or invisible)

This template is used to insert documentation on template pages.


Syntax Type: <noinclude> {{documentation}}</noinclude> at the end of the template page.


Also see: Template:Documentation subpage

Visit Template:Documentation/doc to change this text! (How does this work?)
Done making changes? Refresh this text! (Why?)