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

Difference between revisions of "Template:Ini"

From ModEnc
Jump to: navigation, search
 
(This template can now be used to include the category for the INI's flags. This should be used with Template:Flag.)
Line 1: Line 1:
<includeonly>[[{{{1}}}.ini|{{{1}}}{md}.ini]]</includeonly><noinclude>Usage:<pre>{{Ini|ini-name}}</pre>Copy-paste the code above and replace "ini-name" with the name of the ini you want to link, without its .ini file extension, e.g.<pre>{{Ini|rules}}</pre> gives {{Ini|rules}}</noinclude>
+
<includeonly>[[{{{1|rules}}}.ini|{{{1|rules}}}(md).ini]]{{#ifeq:{{{catinc|no}}}|yes|[[Category:{{{1|rules}}}(md).ini_Flags]]|}}</includeonly><noinclude>
 +
==Usage==
 +
 
 +
===Quick Link Generation===
 +
{{Ini{{!}}''ini-name''}}
 +
Copy and paste the code above and replace ''ini-name'' with the name of the [[INI]] file you want to link, without the file extension and the "md" suffix. If parameter 1 is omitted, it defaults to <code>rules</code>.
 +
 
 +
====Example====
 +
<pre>{{Ini|rules}}</pre>
 +
This code yields {{ini|rules}}.
 +
 
 +
===Quick Link with Category Insertion===
 +
With the addition of <code>catinc=yes</code>, this template will include the [[Special:Categories|category]] for the flags parsed in the specified [[INI]] file.
 +
 
 +
====Example====
 +
<pre>{{Ini|rules|catinc=yes}}</pre>
 +
This code would also yield {{ini|rules}}, but also include the page in [[:Category:Rules(md).ini_Flags]].
 +
</noinclude>

Revision as of 00:35, 23 May 2008

Usage

Quick Link Generation

{{Ini|ini-name}}

Copy and paste the code above and replace ini-name with the name of the INI file you want to link, without the file extension and the "md" suffix. If parameter 1 is omitted, it defaults to rules.

Example

{{Ini|rules}}

This code yields rules(md).ini.

Quick Link with Category Insertion

With the addition of catinc=yes, this template will include the category for the flags parsed in the specified INI file.

Example

{{Ini|rules|catinc=yes}}

This code would also yield rules(md).ini, but also include the page in Category:Rules(md).ini_Flags.