ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Template:Categ: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Vinifera7 (talk | contribs)
m soothing minor irritations..
Vinifera7 (talk | contribs)
m Trying to make things easier without breaking a whole lot.. please bear with it..
Line 1: Line 1:
<includeonly>{{#ifexist:Category:{{{1}}}_Flags|[[{{{1}}}|{{{2|{{{1}}}}}}]][[Category:{{{1}}}_Flags]]|{{#ifexist:Category:{{#sub:{{{1}}}|0|-1}}_Flags|[[{{{1}}}|{{{2|{{{1}}}}}}]][[Category:{{#sub:{{{1}}}|0|-1}}_Flags]]|[[{{{1}}}_Flags|{{{2|{{{1}}}}}}]][[Category:{{{1}}}_Flags]]}}}}</includeonly><noinclude>
<includeonly>{{#if:{{{ini|}}}|[[{{ini}}.ini|{{{1|{{ini|{{{ini}}}|text}}}}}]][[Category:{{ini|{{{ini}}}|text}}_Flags]]|{{#ifexist:Category:{{{1}}}_Flags|[[{{{1}}}|{{{2|{{{1}}}}}}]][[Category:{{{1}}}_Flags]]|{{#ifexist:Category:{{#sub:{{{1}}}|0|-1}}_Flags|[[{{{1}}}|{{{2|{{{1}}}}}}]][[Category:{{#sub:{{{1}}}|0|-1}}_Flags]]|[[{{{1}}}_Flags|{{{2|{{{1}}}}}}]][[Category:{{{1}}}_Flags]]}}}}}}</includeonly><noinclude>
This template creates a link and adds the page to the appropriate subcategory of [[:Category:INI_Flags]].
This template creates a link and adds the page to the appropriate subcategory of [[:Category:INI_Flags]].


Line 5: Line 5:
This is intented to be used with [[Template:Flag]] to link to certain pages, while adding the flags categories as well. It is not meant to be used as a shortcut for writing out a link to a category page.
This is intented to be used with [[Template:Flag]] to link to certain pages, while adding the flags categories as well. It is not meant to be used as a shortcut for writing out a link to a category page.


===For <code>types</code> parameter of Template:Flag===
Certain titles of subcategories of [[:Category:INI_Flags]] exclude the terminating "s" that is present in the corresponding article's page. For example, the title of [[Warheads]] contains a terminating "s", while [[:Category:Warhead_Flags]] does not. Although <code>{{Categ|Warhead|Warheads}}</code> would function correctly, this template automatically accounts for the terminating "s" if <code>{{Categ|Warheads}}</code> were used instead.{{fnl|1}}
Certain titles of subcategories of [[:Category:INI_Flags]] exclude the terminating "s" that is present in the corresponding article's page. For example, the title of [[Warheads]] contains a terminating "s", while [[:Category:Warhead_Flags]] does not. Although <code>{{Categ|Warhead|Warheads}}</code> would function correctly, this template automatically accounts for the terminating "s" if <code>{{Categ|Warheads}}</code> were used instead.{{fnl|1}}


===Examples===
====Examples====
<pre>{{Categ|InfantryTypes}}</pre>
<pre>{{Categ|InfantryTypes}}</pre>
This code yields [[InfantryTypes]] and includes the page in [[:Category:InfantryTypes_Flags]].
This code yields [[InfantryTypes]] and includes the page in [[:Category:InfantryTypes_Flags]].


Should customized hypertext be necessary, parameter <code>2</code> can be used:
<pre>{{Categ|InfantryTypes|infantry}}</pre>
<pre>{{Categ|InfantryTypes|infantry}}</pre>
This code yields [[InfantryTypes|infantry]] and includes the page in [[:Category:InfantryTypes_Flags]].
This code yields [[InfantryTypes|infantry]] and includes the page in [[:Category:InfantryTypes_Flags]].
===For <code>files</code> parameter of Template:Flag===
When this template is used for the value of the <code>files</code> parameter of [[Template:Flag]], the <code>ini</code> parameter should be used to specify the correct ini-file.
====Example====
<pre>{{Categ|ini=art}}</pre>
This code yields {{ini|art}} and includes the page in [[:Category:{{ini|art|text}}_Flags]].
Should customized hypertext be necessary, parameter <code>1</code> can be used:
<pre>{{Categ|ini=art|art}}</pre>
This code yields [[art]] and includes the page in [[:Category:{{ini|art|text}}_Flags]].


==Notes==
==Notes==
{{fn|1|This template is automagically delicious.}}
{{fn|1|This template is automagically delicious.}}
</noinclude>
</noinclude>

Revision as of 03:57, 23 May 2008

This template creates a link and adds the page to the appropriate subcategory of Category:INI_Flags.

Usage

This is intented to be used with Template:Flag to link to certain pages, while adding the flags categories as well. It is not meant to be used as a shortcut for writing out a link to a category page.

For types parameter of Template:Flag

Certain titles of subcategories of Category:INI_Flags exclude the terminating "s" that is present in the corresponding article's page. For example, the title of Warheads contains a terminating "s", while Category:Warhead_Flags does not. Although Warheads would function correctly, this template automatically accounts for the terminating "s" if Warheads were used instead.1

Examples

{{Categ|InfantryTypes}}

This code yields InfantryTypes and includes the page in Category:InfantryTypes_Flags.

Should customized hypertext be necessary, parameter 2 can be used:

{{Categ|InfantryTypes|infantry}}

This code yields infantry and includes the page in Category:InfantryTypes_Flags.

For files parameter of Template:Flag

When this template is used for the value of the files parameter of Template:Flag, the ini parameter should be used to specify the correct ini-file.

Example

{{Categ|ini=art}}

This code yields art(md).ini and includes the page in Category:art(md).ini_Flags.

Should customized hypertext be necessary, parameter 1 can be used:

{{Categ|ini=art|art}}

This code yields art and includes the page in Category:art(md).ini_Flags.

Notes

1 This template is automagically delicious.