Template:Cat/doc: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
No edit summary
No edit summary
Line 1: Line 1:
'''{{tl|catfix}}''' is a simple little template that helps you make sure that your template doesn't get placed into the category that the template automatically places pages into.   
'''{{tl|catfix}}''' is a simple little template that is used to build other templates.  It ensures your template doesn't get placed into the category that the template automatically populates.   


For instance, if you use the template, {{tl|what?}}, on a page, that page gets put into [[:category:Articles with statements that need clarification]].  This template prevents [[:template:what?]] and [[:template:what?/doc]] from getting placed into that category.
For instance, if you use the template, {{tl|what?}}, on a page, that page gets put into [[:category:Articles with statements that need clarification]].  This template prevents [[:template:what?]] (and [[:template:what?/doc]]) from getting placed into that category.


This template, or at least the raw code of the template, should '''always''' be used in the code of any template that automatically categorises pages.  There's never a reason that a template or a template documentation page should be in the category which the template creates.
This template, or at least the raw code of the template, should '''always''' be used in the code of any template that automatically categorises pages.  There's never a reason that a template or a template documentation page should be in the category which the template creates.
Line 8: Line 8:
To use, simply type
To use, simply type
<pre>
<pre>
{{catfix|<name of category>}}
{{cat|<name of category>}}


so, for our {{what?}} example,
so, for our {{what?}} example,


{{catfix|Articles with statements that need clarification}}
{{cat|Articles with statements that need clarification}}
</pre>
</pre>
That's it!  Simple stuff — and fewer keystrokes than typing [[category:<category name]].
That's it!  Simple stuff — and fewer keystrokes than typing [[category:<category name]].

Revision as of 21:51, 29 August 2011

{{catfix}} is a simple little template that is used to build other templates. It ensures your template doesn't get placed into the category that the template automatically populates.

For instance, if you use the template, {{what?}}, on a page, that page gets put into category:Articles with statements that need clarification. This template prevents template:what? (and template:what?/doc) from getting placed into that category.

This template, or at least the raw code of the template, should always be used in the code of any template that automatically categorises pages. There's never a reason that a template or a template documentation page should be in the category which the template creates.

Usage

To use, simply type

{{cat|<name of category>}}

so, for our {{what?}} example,

{{cat|Articles with statements that need clarification}}

That's it! Simple stuff — and fewer keystrokes than typing [[category:<category name]].