Difference between revisions of "Template:PropVals/Print Entry/doc"
From Salem Wiki
m (adding documentation) |
m (→Description: typo) |
||
Line 1: | Line 1: | ||
==Description== | ==Description== | ||
− | :This template is used to display | + | :This template is used to display an '''''entry''''' of a '''''grouped-record''''' in a visually appealing way, by outputting an icon-image followed by a link to the page of the object followed by the amount when requested. |
:It uses {{t|PropVals/Split}} to extract the name- and amount-fields from the '''''entry'''''. | :It uses {{t|PropVals/Split}} to extract the name- and amount-fields from the '''''entry'''''. | ||
:The filename of the icon-image is composed of the object-name followed by "_icon.png". | :The filename of the icon-image is composed of the object-name followed by "_icon.png". | ||
+ | |||
==Syntax== | ==Syntax== | ||
:Type the below code somewhere inside your code: <code><nowiki>{{PropVals/Print Entry}}</nowiki></code> | :Type the below code somewhere inside your code: <code><nowiki>{{PropVals/Print Entry}}</nowiki></code> |
Revision as of 12:54, 26 June 2012
Description
- This template is used to display an entry of a grouped-record in a visually appealing way, by outputting an icon-image followed by a link to the page of the object followed by the amount when requested.
- It uses {{PropVals/Split}} to extract the name- and amount-fields from the entry.
- The filename of the icon-image is composed of the object-name followed by "_icon.png".
Syntax
- Type the below code somewhere inside your code:
{{PropVals/Print Entry}}
- It accepts the following parameters:
- named-parameters:
- sep
- Optional; The separator to use for splitting the fields inside the entry.
- Defaults to a dot-colon ';'
- showamount
- Optional; Controls the display of the amount-field.
- Any value that differs from "no" will make it display the amount-field.
- Defaults to "no".
- sep
- 1 entry as unnamed-parameter:
- An entry has the following structure: 'ObjectnamesepAmount'
- Using the default sep that could look like 'Board;10'
- named-parameters:
Examples
- {{PropVals/Print Entry|Anvil;10}} or {{PropVals/Print Entry|sep=;|Anvil;10}} gives:
Anvil x10 - {{PropVals/Print Entry|showamount=y|Anvil;10}} or {{PropVals/Print Entry|sep=;|showamount=y|Anvil;10}} gives:
Anvil x10