Difference between revisions of "User:Alistaire/Template:DefsStdFormatter"

From RimWorld Wiki
Jump to navigation Jump to search
(Changed from default to if statement, so if 2 is empty it doesn't overwrite 1)
(<tag> to <>tag)
 
Line 1: Line 1:
<noinclude>{{Documentation}}</noinclude><includeonly>[[{{#if:{{{2|}}}|{{{2}}}|{{{1|}}}}}|{{#if:{{{3|}}}|@{{{1}}}|&lt;{{{1}}}&gt;}}]]</includeonly>
+
<noinclude>{{Documentation}}</noinclude><includeonly>[[{{#if:{{{2|}}}|{{{2}}}|{{{1|}}}}}|{{#if:{{{3|}}}|@{{{1}}}|&lt;&gt;{{{1}}}}}]]</includeonly>

Latest revision as of 14:15, 13 April 2015

Documentation[view] [edit] [history] [purge]

Example documentation

Parameters[edit]

Parameter Explanation
1 (required): What tag name to display and link to.
2 (optional): Overwrites the linked to tag.
3 (optional): If this exists, it will format to @{{{1}}} instead of <{{{1}}}>.


Examples[edit]

Input Output
{{User:Alistaire/Template:DefsStdFormatter|thingDef}}
<>thingDef
{{User:Alistaire/Template:DefsStdFormatter|ThingDef|ThingDef}}
<>ThingDef
{{User:Alistaire/Template:DefsStdFormatter|ThingDef||1}}
@ThingDef