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

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

Revision as of 13:44, 12 April 2015

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

Example documentation

Parameters

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

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