Difference between revisions of "Template:Doc"

From Legion Wiki
Jump to navigationJump to search
(Created page with '<noinclude>{{doc}}category: Templates</noinclude><includeonly>{{ #ifexist: {{FULLPAGENAMEE}}/doc | <div style="text-align:right;font-size:xx-small;">(Transcluded documentatio…')
 
m
 
Line 1: Line 1:
<noinclude>{{doc}}[[category: Templates]]</noinclude><includeonly>{{ #ifexist: {{FULLPAGENAMEE}}/doc | <div style="text-align:right;font-size:xx-small;">(Transcluded documentation: [[{{FULLPAGENAMEE}}/doc|view]])</div>{{:{{FULLPAGENAMEE}}/doc}} | <div style="text-align:right;font-size:xx-small;">(Transcluded documentation: [[{{FULLPAGENAMEE}}/doc|create]])</div>{{#if:{{{hack|}}}|{{:{{FULLPAGENAME}}/doc}}|}}}}</includeonly>
+
<noinclude>{{doc}}[[category: Templates]]</noinclude><includeonly>{{ #ifexist: {{FULLPAGENAMEE}}/doc | <div style="text-align:right;font-size:xx-small;">(Transcluded documentation: [[{{FULLPAGENAMEE}}/doc|view]])</div>{{:{{FULLPAGENAMEE}}/doc}}
 +
 
 +
| <div style="text-align:right;font-size:xx-small;">(Transcluded documentation: [[{{FULLPAGENAMEE}}/doc|create]])</div>{{#if:{{{hack|}}}|{{:{{FULLPAGENAME}}/doc}}|}}}}
 +
 
 +
</includeonly>

Latest revision as of 21:27, 30 October 2011

(Transcluded documentation: view)

Using {{doc}} on a page will transclude the text of the /doc/ sub-page, (if that page exists). If it does not, it will do nothing.

On Template:Tl, the sub-page would be Template:Tl/doc.

{{doc}}'s purpose is to make maintaining template documentation easier, while also separating the edit history of the documentation from the edit history of the template itself.

On very rare occasions involving template's with URL-encoded characters in their name, {{doc}} will fail to include the external template. The current workaround for this is simply to set |hack=true

The /doc/ sub-page should be placed in Category:Template documentation (within a <noinclude> tag.)

<noinclude>[[Category:Template documentation]]</noinclude>