Template:Documentation: Difference between revisions

From Greyhawk Wiki
Jump to navigation Jump to search
FR>Game widow
No edit summary
m 1 revision imported: Import from Mediawiki
 
(25 intermediate revisions by 12 users not shown)
Line 1: Line 1:
<div class="template-documentation plainlinks">
<includeonly>{|class="grey" style="width:100%;"
{{#ifeq:{{{heading|μ}}}|<!--**DEFINED BUT EMPTY**-->
|-
  |<!--**NOTHING**-->
!Template documentation follows
  |<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}}}}}
|<em><strong>Note:</strong> the template above may sometimes be partially or fully invisible.</em>
    |<!--**    /doc EXISTS**  -->[[{{fullurl:{{{1|{{Documentation/docname}}}}}|action=edit}} edit]] [{{purge|purge}}]  
|-
    |<!--**/doc DOESN'T EXIST**-->[[{{fullurl:{{{1|{{Documentation/docname }}}}}|action=edit&preload=Template:Documentation/preload}} create]]
|<span class="noicon">[{{fullurl:{{ns:10}}:{{{1|{{PAGENAME}}}}}/doc|action=purge}} View] &bull; [{{fullurl:{{ns:10}}:{{{1|{{PAGENAME}}}}}/doc|action=edit}} Edit] &bull; [{{fullurl:{{ns:10}}:{{{1|{{PAGENAME}}}}}/doc|action=history}} History]</span>
  }}</span>
|}
  }} <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|link=]] Template documentation|Documentation}}}}</span></div>
{{#ifexist: {{FULLPAGENAME}}/doc|
}}<!--
:''The following documentation is transcluded from [[{{FULLPAGENAME}}/doc]]:''
 
{{/doc}}
--><div id="template_doc_page_transcluded" class="dablink plainlinks"><!--
|:''This template is not yet documented. Please create documentation here: [[{{FULLPAGENAME}}/doc]]''[[Category:Templates without documentation]]}}</includeonly><noinclude>{{doc}}[[Category:Maintenance templates|{{PAGENAME}}]]</noinclude>
  -->{{#ifexist: {{{1|{{Documentation/docname}}}}}
  |<!--**/doc EXISTS**-->This 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|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 style="clear: both;"></div>
</div>
<noinclude>
[[Category:Templates]]
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>

Latest revision as of 10:50, 3 January 2025

Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
ViewEditHistory
The following documentation is transcluded from Template:Documentation/doc:

This template can be used on any other template page to transclude documentation on how to use the other template.

If a documentation subpage (/doc) already exists, the content of that page will be displayed (like in this case). Otherwise, it will show a short note about missing documentation combined with a link to the subpage to be written.

This is useful to reduce the amount of wikicode that is transcluded every time the template in question is used. Everything that does not need to be transcluded should be put on this subpage, including interwiki links.

Usage

When creating a template page, copy and paste the following, to automatically insert the Usage information, if it exists.

<noinclude>{{doc}}</noinclude>