Difference between revisions of "Template:Documentation"
(I think I got it right.) |
m (Unlike wikipedia, we don't have shortlinks for edit/purge/etc. But action= works just fine.) |
||
Line 2: | Line 2: | ||
<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"> | ||
<span style="font-weight:bold;font-size:125%">Template documentation </span> | <span style="font-weight:bold;font-size:125%">Template documentation </span> | ||
− | <span id="doc-editlinks" class="plainlinks">{{#ifexist:{{FULLPAGENAME}}/doc|[[[{{FULLPAGENAME}}/doc|view]]] [[{{fullurl:{{FULLPAGENAME}}/doc|edit}} edit]] [[{{fullurl:{{FULLPAGENAME}}/doc|history}} history]] [[{{fullurl:{{FULLPAGENAME}}|purge}} purge]]|{{#if:{{{1|}}}||[[https://wiki.teamfortress.com/wiki/{{FULLPAGENAME}}/doc?action=edit&preload=Template:Documentation/preload create]]}}}}</span> | + | <span id="doc-editlinks" class="plainlinks">{{#ifexist:{{FULLPAGENAME}}/doc|[[[{{FULLPAGENAME}}/doc|view]]] [[{{fullurl:{{FULLPAGENAME}}/doc|action=edit}} edit]] [[{{fullurl:{{FULLPAGENAME}}/doc|action=history}} history]] [[{{fullurl:{{FULLPAGENAME}}|action=purge}} purge]]|{{#if:{{{1|}}}||[[https://wiki.teamfortress.com/wiki/{{FULLPAGENAME}}/doc?action=edit&preload=Template:Documentation/preload create]]}}}}</span> |
</div> | </div> | ||
{{#ifexist:{{FULLPAGENAME}}/doc|{{{{PAGENAME}}/doc}}|{{{1|}}}}} | {{#ifexist:{{FULLPAGENAME}}/doc|{{{{PAGENAME}}/doc}}|{{{1|}}}}} | ||
</div> | </div> |
Revision as of 10:14, 30 November 2021
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>