Difference between revisions of "Template:Documentation"

From TRMN
Jump to navigation Jump to search
(Created page with "<includeonly><div style="border: 1px solid #2A3C52; margin: 1em; margin-top: 3em;"><div style="background: #000033; color: #FFFFFF; padding: 1em; margin: 0em;">'''Template doc...")
 
m
 
Line 1: Line 1:
<includeonly><div style="border: 1px solid #2A3C52; margin: 1em; margin-top: 3em;"><div style="background: #000033; color: #FFFFFF; padding: 1em; margin: 0em;">'''Template documentation''' <span style="font-size: 85%;">(for the above template, sometimes hidden or invisible)</span></div><div style="padding: 1em; padding-bottom: 0em; margin: 0em;">{{#ifexist: {{FULLPAGENAME}}/doc
<includeonly>{{#ifexist: {{FULLPAGENAME}}/doc|
|{{tocright}}
:''The following documentation is transcluded from [[{{FULLPAGENAME}}/doc]]:''
{{{{PAGENAME}}/doc}}
{{/doc}}
|This template currently doesn't have any documentation! Help out by [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=Template:Documentation/preload}} writing some].}}
|:''This template is not yet documented. Please create documentation here: [[{{FULLPAGENAME}}/doc]]''[[Category:Wiki templates without documentation]]}}</includeonly><noinclude>{{doc}}[[Category:Wiki maintenance templates|{{PAGENAME}}]]</noinclude>
</div><br style="clear: both;"/><div style="background: #000033; color: #FFF; padding: 0.5em; margin: 0em; font-size: 85%; text-align: right;">Visit [[{{FULLPAGENAME}}/doc]] to edit this text!</div></div></includeonly><noinclude>
{{Documentation}}
[[Category:Templates|{{PAGENAME}}]]
</noinclude>

Latest revision as of 14:52, 12 December 2018

The following documentation is transcluded from Template:Documentation/doc:

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

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

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