Difference between revisions of "Template:PropVals/List/doc"
From Salem Wiki
< Template:PropVals | List
m (adding documentation) |
m (Protected "Template:PropVals/List/doc": Documentation of key-feature ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 21: | Line 21: | ||
:*:Using the default '''sep''' that could look like 'Board;10' | :*:Using the default '''sep''' that could look like 'Board;10' | ||
==Examples== | ==Examples== | ||
− | # | + | #<code><nowiki><ul></nowiki><br/><nowiki>{{PropVals/List|sep=;|showamount=no|Anvil;|Flint;1|Stone;3}}</nowiki><br/><nowiki>{{PropVals/List|sep=;|showamount=y|heading=Startpost|Lime;15|Flint;15|Stone;30}}</nowiki><br/><nowiki>{{PropVals/List|sep=;|showamount=yes|heading=|Board;10|Nails;4}}</nowiki><br/><nowiki></ul></nowiki></code> |
+ | #:gives: | ||
+ | <blockquote><ul> | ||
+ | {{PropVals/List|sep=;|showamount=no|Anvil;|Flint;1|Stone;3}} | ||
+ | {{PropVals/List|sep=;|showamount=y|heading=Startpost|Lime;15|Flint;15|Stone;30}} | ||
+ | {{PropVals/List|sep=;|showamount=yes|heading=|Board;10|Nails;4}} | ||
+ | </ul></blockquote> | ||
<includeonly>[[Category:Templates|{{PAGENAME}}]]<!-- Any categories for the template itself --> | <includeonly>[[Category:Templates|{{PAGENAME}}]]<!-- Any categories for the template itself --> | ||
[[Category:Templates/©TriMoon™|{{SUBPAGENAME}}]] | [[Category:Templates/©TriMoon™|{{SUBPAGENAME}}]] | ||
</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude> | </includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude> |
Latest revision as of 18:12, 25 July 2012
Description
- This template is used to output each entry of a grouped-record under a common group-heading when appropriate, as list-items
<li>...</li>
. - It is used as a wrapper to inject extra arguments into {{PropVals/Print Entry}}, to output each entry.
Syntax
- Type the below code somewhere inside your code:
{{PropVals/List}}
- It accepts the following parameters:
- named-parameters:
- heading
- Optional; Controls the display of a group-heading when provided.
- Defaults to being empty, thus not grouping entries under a group-heading.
- sep
- Optional; The separator to use for splitting the fields inside the entry by {{PropVals/Print Entry}}.
- Defaults to a dot-colon ';'
- showamount
- Optional; Controls the display of the amount-field by {{PropVals/Print Entry}}.
- Any value that differs from "no" will make it display the amount-field.
- Defaults to "no".
- heading
- Any amount of entries as unnamed-parameters:
- These unnamed-parameters will be injected into {{PropVals/Print Entry}} one by one. (currently max. 10 supported)
- An entry has the following structure: 'ObjectnamesepAmount'
- Using the default sep that could look like 'Board;10'
- named-parameters:
Examples
<ul>
{{PropVals/List|sep=;|showamount=no|Anvil;|Flint;1|Stone;3}}
{{PropVals/List|sep=;|showamount=y|heading=Startpost|Lime;15|Flint;15|Stone;30}}
{{PropVals/List|sep=;|showamount=yes|heading=|Board;10|Nails;4}}
</ul>- gives: