Difference between revisions of "Template:Documentation"

From Team Fortress Wiki
Jump to: navigation, search
m
Line 1: Line 1:
<includeonly>
+
<div style="border:1px solid #aaa; background:#F2F2FC; padding:0.75em; margin:0.5em 0;">
<div style="border:1px solid #aaa;background:#F2F2FC;width=100%;padding:0.5em; margin-bottom: 5px;">
 
 
<div style="float: right;" class="plainlinks">&#91;[[{{{1|{{FULLPAGENAME}}/doc}}}|view]]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{FULLPAGENAMEE}}/doc}}}|action=edit}} edit]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{FULLPAGENAMEE}}/doc}}}|action=purge}} purge]&#93;
 
<div style="float: right;" class="plainlinks">&#91;[[{{{1|{{FULLPAGENAME}}/doc}}}|view]]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{FULLPAGENAMEE}}/doc}}}|action=edit}} edit]&#93;&nbsp;&#91;[{{fullurl:{{{1|{{FULLPAGENAMEE}}/doc}}}|action=purge}} purge]&#93;
 
</div>
 
</div>
<span style="font-size:188%">Documentation for ''{{{1|{{PAGENAME}}}}}''</span>
+
<h1 style="margin-top:-0.25em; margin-bottom: 0.25em;">Documentation for ''{{{1|{{PAGENAME}}}}}''</h1><includeonly>
----
 
 
{{ #ifexist: {{{content|{{NAMESPACE}}:{{PAGENAME}}/doc}}}  | {{{{{content|{{NAMESPACE}}:{{PAGENAME}}/doc}}}}} | }}
 
{{ #ifexist: {{{content|{{NAMESPACE}}:{{PAGENAME}}/doc}}}  | {{{{{content|{{NAMESPACE}}:{{PAGENAME}}/doc}}}}} | }}
</div>
+
</div></includeonly><includeonly>
 
{{ #ifexist: {{{1|{{NAMESPACE}}:{{PAGENAME}}/doc}}} | <!-- /doc exists -->
 
{{ #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; 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={{NAMESPACE}}:{{PAGENAME}}/doc]]  ''This [[:Category:Template documentation|documentation]] is transcluded from [[{{{1|{{NAMESPACE}}:{{PAGENAME}}/doc}}}]]''.
</div> |<!-- no /doc --> }}
+
</div> |<!-- no /doc --> }}</includeonly>__NOEDITSECTION__<noinclude>
__NOEDITSECTION__
+
== Usage ==
</includeonly>
+
* Place {{tl|Template doc}} inside {{code|<noinclude>}} tags on a template page to display [[:Category:Template documentation|template documentation]].
<noinclude>
+
* Generally template documentation should only be used on complex templates with multiple parameters. The majority of templates won't need a separate documentation subpage.
{{Template doc}}
+
* If you want to have documentation displayed without a subpage, but with the green box, use {{tl|Doc begin}}.
[[Category:Templates|{{PAGENAME}}]]
 
  
 +
[[Category:Template documentation| ]]
 +
[[Category:Templates|Template doc]]
 
</noinclude>
 
</noinclude>

Revision as of 11:30, 26 August 2010

Documentation for Documentation

Usage

  • Place {{Template doc}} inside tags on a template page to display template documentation.
  • Generally template documentation should only be used on complex templates with multiple parameters. The majority of templates won't need a separate documentation subpage.
  • If you want to have documentation displayed without a subpage, but with the green box, use {{Doc begin}}.