Template:TlDoc/doc: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>J. Noel Chiappa
(Mention subpage name)
imported>Caesar Schinas
No edit summary
Line 1: Line 1:
'''Usage'''
<!-- Do not remove this line. Replace the instructions below with the correct documentation. -->


<nowiki>{{TlDoc}}</nowiki> is used to include template documentation, stored on the "/doc" [[CZ:Subpage|subpage]] of that template (to minimize the size of the template), when a template is viewed. '''Important:''' Wrap the call to <nowiki>{{TlDoc}}</nowiki> inside <nowiki><no</nowiki><nowiki>include></nowiki><nowiki></no</nowiki><nowiki>include></nowiki>; the size reduction will not occur without this step
==== Usage ====
<code><nowiki>{{TlDoc}}</nowiki></code> is used to include template documentation, stored on the <code>.../doc</code> [[CZ:Subpage|subpage]] of that template (to minimize the size of the template), when a template page is viewed directly.<br />
'''Important:''' Wrap the call to <code><nowiki>{{TlDoc}}</nowiki></code> inside <code><nowiki><noinclude>...</noinclude></nowiki></code> tags as seen below, to prevent the documentation from being shown on pages where the template is used.


'''Example''':
==== Example ====
The following code should be used on the template page :


<nowiki>{{TlDoc}}</nowiki>
<code><nowiki><includeonly></nowiki></code><br />
<b><code>...template code here...</code></b><br />
<code><nowiki></includeonly><noinclude>{{TlDoc}}</noinclude></nowiki></code>


gives:
to give the following result when the template page is viewed :


{{TlDoc}}
{{TlDoc}}

Revision as of 12:45, 4 May 2009


Usage

{{TlDoc}} is used to include template documentation, stored on the .../doc subpage of that template (to minimize the size of the template), when a template page is viewed directly.
Important: 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.

Example

The following code should be used on the template page :

<includeonly>
...template code here...
</includeonly><noinclude>{{TlDoc}}</noinclude>

to give the following result when the template page is viewed :


No documentation has yet been written for this template. Create Documentation