Difference between revisions of "Template:PropVals/Group"
From Salem Wiki
m (Changing 1st-call to use helper-template also, and displaying an error-msg when no records are provided at all.) |
m (Protected "Template:PropVals/Group": Key feature of wiki ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
(No difference)
|
Latest revision as of 18:09, 25 July 2012
- PropVals/Group:
- You need to provide records tobe processed !
Template documentation (for the template shown above, sometimes hidden or invisible)
Description
- This is a wrapper-template that generates output, which will be used as arguments for {{PropVals/List}}.
{{#arraymap:}}
will be used as a wrapper, that uses this generated-output, to inject the extra arguments for {{PropVals/List}}.- This generated-output is a concatenation of grouped-records, using {{PropVals/Group/NextPart}} to output these grouped-records.
- This wrapper-template is used to feed individual records to its helper-template, {{PropVals/Group/NextPart}}, therefore it has a hard-coded limit on the amount of records it can process !
- This limit, currently 20, can be increased by properly expanding the code inside...
Syntax
- Type the below code somewhere inside your code:
{{PropVals/Group |sep={{{sep|;}}} |grpsep={{{grpsep|/\}}} |<record>|<record>|<record>|etc...}}
Examples
- {{PropVals/Group|sep={{{sep|;}}}|grpsep={{{grpsep|/\}}}|Lime;15;Startpost |Flint;15;Startpost |Stone;30;Startpost |Lime;8;Cornerpost |Flint;8;Cornerpost |Stone;15;Cornerpost |Flint;1;Wallsegment |Stone;3;Wallsegment |Board;10;Gate |Nails;4;Gate}}
gives:
heading=Startpost|Lime;15|Flint;15|Stone;30/\heading=Cornerpost|Lime;8|Flint;8|Stone;15/\heading=Wallsegment|Flint;1|Stone;3/\heading=Gate|Board;10|Nails;4
Visit Template:PropVals/Group/doc to edit this text! (How does this work?)