Difference between revisions of "Template:Documentation"

From Team Fortress Wiki
Jump to: navigation, search
m (Equal title to Template: Doc begin)
m (Undo edit by Tiagoquix (Talk) (3503912) // Breaks pages)
(Tag: Undo)
 
Line 1: Line 1:
 
<div id="template-documentation" style="clear: both; margin: 1em 0 0 0; border: 1px solid #aaa; background-color: #ecfcf4; padding: 1em; font-family: sans-serif">
 
<div id="template-documentation" style="clear: both; margin: 1em 0 0 0; border: 1px solid #aaa; background-color: #ecfcf4; padding: 1em; font-family: sans-serif">
 
<div style="padding-bottom:3px;border-bottom:1px solid #aaa;margin-bottom:1ex">
 
<div style="padding-bottom:3px;border-bottom:1px solid #aaa;margin-bottom:1ex">
<h1 style="margin-top:-0.25em;" >Documentation for ''{{{1|{{PAGENAME}}}}}''</h1>
+
<span style="font-weight:bold;font-size:125%">Template documentation </span>
 
<span id="doc-editlinks" class="plainlinks">{{#ifexist:{{FULLPAGENAME}}/doc|&#91;[[{{FULLPAGENAME}}/doc|view]]&#93; &#91;[{{fullurl:{{FULLPAGENAME}}/doc|action=edit}} edit]&#93; &#91;[{{fullurl:{{FULLPAGENAME}}/doc|action=history}} history]&#93; &#91;[{{fullurl:{{FULLPAGENAME}}|action=purge}} purge]&#93;|{{#if:{{{1|}}}||&#91;[https://wiki.teamfortress.com/wiki/{{FULLPAGENAME}}/doc?action=edit&preload=Template:Documentation/preload create]&#93;}}}}</span>
 
<span id="doc-editlinks" class="plainlinks">{{#ifexist:{{FULLPAGENAME}}/doc|&#91;[[{{FULLPAGENAME}}/doc|view]]&#93; &#91;[{{fullurl:{{FULLPAGENAME}}/doc|action=edit}} edit]&#93; &#91;[{{fullurl:{{FULLPAGENAME}}/doc|action=history}} history]&#93; &#91;[{{fullurl:{{FULLPAGENAME}}|action=purge}} purge]&#93;|{{#if:{{{1|}}}||&#91;[https://wiki.teamfortress.com/wiki/{{FULLPAGENAME}}/doc?action=edit&preload=Template:Documentation/preload create]&#93;}}}}</span>
 
</div>
 
</div>
 
{{#ifexist:{{FULLPAGENAME}}/doc|{{{{FULLPAGENAME}}/doc}}|{{{1|}}}}}
 
{{#ifexist:{{FULLPAGENAME}}/doc|{{{{FULLPAGENAME}}/doc}}|{{{1|}}}}}
 
</div>
 
</div>

Latest revision as of 01:11, 4 September 2023

Template documentation [view] [edit] [history] [purge]

This template is used to show documentation that explains other templates.

Usage

Add this template to the end of other templates while wrapped in <noinclude> tags to show the documentation. It will show the /doc subpage of the template in a green box.

<!--Last line of your template code--><noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage, not here -->
</noinclude>

Alternatively, you can use a parameter for documentation instead of creating a /doc page:

<!--Last line of your template code--><noinclude>
{{Documentation|
<!--Documentation goes here-->
}}
</noinclude>