Ad placeholder

Template:Price: Difference between revisions

Jump to navigation Jump to search
Simply, striking backwards compat
(Template support for honour specific values)
(Simply, striking backwards compat)
Line 1: Line 1:
<includeonly><!--
<includeonly><span>{{SmallIcon|Gold Icon.png}} Price: {{{1|}}} gp {{#if:{{{2|}}}|/ {{{2}}} gp{{honour}}}}</span></includeonly><noinclude>
To maintain compatibility with existing templates, the honour mode specific value can be
either specified as the second argument or in the first argument separated by :
-->{{#lvardef:base|{{ #explode: {{{1}}}|:|0}}}}<!--
Split parameter into base price and honour price on the :
-->{{#lvardef:honour|{{ #explode: {{{1}}}|:|1}}}}<!--
-->{{#if: {{{2|{{#lvar: honour}}}}}
  | {{SmallIcon|Gold Icon.png}} Price: {{trim | {{#lvar: base}} }}{{nbts}}gp / {{trim | {{{2|{{#lvar: honour}}}}} }}{{nbts}}gp{{honour}}
  | {{SmallIcon|Gold Icon.png}} Price: {{trim | {{#lvar: base}} }}{{nbts}}gp
}}</includeonly><noinclude> <!-- #8239 is non-breaking thin space -->
Usage: {{code|<nowiki>{{Price|20}}</nowiki>}}
Usage: {{code|<nowiki>{{Price|20}}</nowiki>}}


Result: {{Price|20}}
Result: {{Price|20}}
Usage: {{code|<nowiki>{{Price|20:40}}</nowiki>}}
Result: {{Price|20:40}}


Usage: {{code|<nowiki>{{Price|20|40}}</nowiki>}}
Usage: {{code|<nowiki>{{Price|20|40}}</nowiki>}}

Navigation menu