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.)
m (Trying to make things easier without breaking a whole lot.. please bear with it..)
Line 1: Line 1:
<includeonly>[[{{{1|rules}}}.ini|{{{1|rules}}}(md).ini]]{{#ifeq:{{{catinc|no}}}|yes|[[Category:{{{1|rules}}}(md).ini_Flags]]|}}</includeonly><noinclude>
+
<includeonly>{{#switch:{{{2}}}|text|txt|t={{{1|rules}}}(md).ini|#default=[[{{{1|rules}}}.ini|{{{1|rules}}}(md).ini]]}}</includeonly><noinclude>
 
==Usage==
 
==Usage==
  
Line 10: Line 10:
 
This code yields {{ini|rules}}.
 
This code yields {{ini|rules}}.
  
===Quick Link with Category Insertion===
+
===Formatted Text Generation===
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.
+
This template can also be used to render standardized formatting of INI filenames as text.
  
 
====Example====
 
====Example====
<pre>{{Ini|rules|catinc=yes}}</pre>
+
<pre>{{Ini|rules|txt}}</pre>
This code would also yield {{ini|rules}}, but also include the page in [[:Category:Rules(md).ini_Flags]].
+
This code simply yields {{ini|rules|txt}}. This is used where standardized formatting is important. In most cases it would be easier to simply type it out.
 
</noinclude>
 
</noinclude>

Revision as of 05:40, 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.

Formatted Text Generation

This template can also be used to render standardized formatting of INI filenames as text.

Example

{{Ini|rules|txt}}

This code simply yields rules(md).ini. This is used where standardized formatting is important. In most cases it would be easier to simply type it out.