Template:TlDoc: Difference between revisions
Jump to navigation
Jump to search
imported>Caesar Schinas m (Reverted edits by Caesar Schinas (Talk) to last version by Drew R. Smith) |
imported>Caesar Schinas mNo edit summary |
||
Line 1: | Line 1: | ||
{{#ifeq:{{{1|}}}|complex|<div style="border:1px #bbb solid; background-color:#eee; padding:0.5em; margin:0.5em 0">'''This template employs intricate features of template syntax.'''<br />You are encouraged to familiarise yourself with its setup and parser functions before editing the template.<br />If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages.<br />Remember that you can and should conduct experiments and test improvements in your user space before changing anything here.</div>}} | {{#ifeq:{{{1|}}}|complex|<div style="border:1px #bbb solid; background-color:#eee; padding:0.5em; margin:0.5em 0">'''This template employs intricate features of template syntax.'''<br />You are encouraged to familiarise yourself with its setup and parser functions before editing the template.<br />If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages.<br />Remember that you can and should conduct experiments and test improvements in your user space before changing anything here.</div>}} | ||
<div style="border:1px #bbb solid; background-color:#eee; padding:0.5em; margin:0.5em 0"> | {{#ifexist: {{FULLPAGENAME}}/doc | ||
|<div style="border:1px #bbb solid; background-color:#eee; padding:0.5em; margin:0.5em 0">''This documentation is transcluded from'' [[{{FULLPAGENAME}}/doc]] <small class="plainlinks plainlinksneverexpand">([{{fullurl:{{FULLPAGENAME}}/doc|action=edit}} edit] | [{{fullurl:{{FULLPAGENAME}}/doc|action=history}} history])</small></div> | |||
{{{{FULLPAGENAME}}/doc}} | {{{{FULLPAGENAME}}/doc}} | ||
|''No documentation has yet been written for this template.'' [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=Template:TlDoc/preload&editintro=Template:TlDoc/editintro}} Create Documentation]</div>[[Category:Templates without documentation]] | |<div style="border:1px #bbb solid; background-color:#eee; padding:0.5em; margin:0.5em 0">''No documentation has yet been written for this template.'' [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=Template:TlDoc/preload&editintro=Template:TlDoc/editintro}} Create Documentation]</div>[[Category:Templates without documentation]] | ||
}} | }} |
Revision as of 03:36, 16 June 2009
{{TlDoc}}
is used to include template documentation, stored on the .../doc
subpage of each template, when a template page is viewed directly.
Usage
Wrap the call to {{TlDoc}}
inside <noinclude>...</noinclude>
tags as seen below, to prevent the documentation from being shown on pages where the template is used.
<includeonly>
...template code here...
</includeonly><noinclude>{{TlDoc}}</noinclude>
The template has one optional parameter, complex
, which causes a message to be displayed saying that the template uses complex code.
Examples
{{TlDoc}}
gives
Template loop detected: Template:TlDoc/doc
{{TlDoc|complex}}
gives
This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template.
If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages.
Remember that you can and should conduct experiments and test improvements in your user space before changing anything here.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template.
If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages.
Remember that you can and should conduct experiments and test improvements in your user space before changing anything here.
Template loop detected: Template:TlDoc/doc