Difference between revisions of "Template:Documentation"

From Team Fortress Wiki
Jump to: navigation, search
m (minor fixes)
Line 1: Line 1:
<includeonly>
+
<includeonly><div style="border:1px solid #aaa;background:#F2F2FC;width=100%;padding:0.5em; margin-bottom: 5px;">
<div style="border:1px solid #aaa;background:#F2F2FC;width=100%;padding:0.5em; margin-bottom: 5px;">
+
<div style="float: right;" class="plainlinks">&#91;[[{{{1|/doc}}}|view]]&#93;&nbsp;&#91;[{{fullurl:{{FULLPAGENAMEE}}/doc|action=edit}} edit]&#93;</div><!--
<div style="float: right;">&#91;[[{{{1|{{NAMESPACE}}:{{PAGENAME}}/doc}}}|view]]&#93;&nbsp;&#91;[{{SERVER}}{{localurl:{{{1|{{NAMESPACE}}:{{PAGENAME}}}}}/doc|action=edit}} edit]&#93;
+
-->
 +
= <span style="font-size:188%">Documentation for ''{{{1|{{BASEPAGENAME}}}}}''</span> =
 +
{{ #ifexist: {{{content|{{FULLPAGENAME}}/doc}}} | {{{{{content|}{{FULLPAGENAME}}/doc}}}}} | }}
 
</div>
 
</div>
<span style="font-size:188%">Documentation for ''{{{1|{{PAGENAME}}}}}''</span>
+
{{ #ifexist: {{{1|{{FULLPAGENAME}}/doc}}} | <!-- /doc exists -->
----
 
{{ #ifexist: {{{content|{{NAMESPACE}}:{{PAGENAME}}/doc}}}  | {{{{{content|{{NAMESPACE}}:{{PAGENAME}}/doc}}}}} | }}
 
</div>
 
{{ #ifexist: {{{1|{{NAMESPACE}}:{{PAGENAME}}/doc}}} | <!-- /doc exists -->
 
 
<div style="border:1px solid #aaa;background:#F2F2FC;width=100%;padding:0.5em">
 
<div style="border:1px solid #aaa;background:#F2F2FC;width=100%;padding:0.5em">
::[[Image:Template_info.png|40px|link={{NAMESPACE}}:{{PAGENAME}}/doc]]  ''This [[:Category:Template documentation|documentation]] is transcluded from [[{{{1|{{NAMESPACE}}:{{PAGENAME}}/doc}}}]]''.
+
::[[Image:Template_info.png|40px|link={{FULLPAGENAME}}/doc]]  ''This [[:Category:Template documentation|documentation]] is transcluded from [[{{{1|/doc}}}]]''.
</div> |<!-- no /doc --> }}
+
</div> |<!-- no /doc --> }} __NOEDITSECTION__ </includeonly><!--
__NOEDITSECTION__
 
</includeonly>
 
<noinclude>
 
{{Template doc}}
 
[[Category:Templates|{{PAGENAME}}]]
 
  
</noinclude>
+
--><noinclude>{{Template doc}}[[Category:Templates|{{BASEPAGENAME}}]]</noinclude>

Revision as of 06:39, 26 July 2010

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>