Difference between revisions of "Template:PropVals/Group"

From Salem Wiki
Jump to: navigation, search
m (yes it did fix the bug, great now we can move on finally.)
m (Protected "Template:PropVals/Group": Key feature of wiki ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<onlyinclude>{{#if: {{PropVals/Split|val={{{1}}}|sep={{{sep|;}}}|part=2}}
+
<onlyinclude><!--
| {{PropVals/Split|val={{{1}}}|sep={{{sep|;}}}|part=tail}}{{!}}<!--
+
-->{{#if: {{{1|}}}
-->{{#sub:{{{1}}} | 0 | {{#rpos:{{{1}}}|{{{sep|;}}} }} }}<!--
+
| {{PropVals/Group/NextPart
-->{{#if: {{{2|}}}
+
|val={{{1|}}}
| {{PropVals/Group/NextPart
+
|sep={{{sep|;}}}
|preval={{{1|}}}
+
|grpsep={{{grpsep|/\}}}
|val={{{2|}}}
+
}}
|sep={{{sep|;}}}
+
| <dl class="error"><!--
|grpsep={{{grpsep|/\}}}
+
--><dt>PropVals/Group:<!--
}}<!--
+
--><dd>You need to provide records tobe processed !<!--
-->}}<!--
+
--></dl>
-->{{#if: {{{3|}}}
+
}}<!--
| {{PropVals/Group/NextPart
+
-->{{#if: {{{2|}}}
|preval={{{2|}}}
+
| {{PropVals/Group/NextPart
|val={{{3|}}}
+
|preval={{{1|}}}
|sep={{{sep|;}}}
+
|val={{{2|}}}
|grpsep={{{grpsep|/\}}}
+
|sep={{{sep|;}}}
}}<!--
+
|grpsep={{{grpsep|/\}}}
-->}}<!--
+
}}
-->{{#if: {{{4|}}}
+
}}<!--
| {{PropVals/Group/NextPart
+
-->{{#if: {{{3|}}}
|preval={{{3|}}}
+
| {{PropVals/Group/NextPart
|val={{{4|}}}
+
|preval={{{2|}}}
|sep={{{sep|;}}}
+
|val={{{3|}}}
|grpsep={{{grpsep|/\}}}
+
|sep={{{sep|;}}}
}}<!--
+
|grpsep={{{grpsep|/\}}}
-->}}<!--
+
}}
-->{{#if: {{{5|}}}
+
}}<!--
| {{PropVals/Group/NextPart
+
-->{{#if: {{{4|}}}
|preval={{{4|}}}
+
| {{PropVals/Group/NextPart
|val={{{5|}}}
+
|preval={{{3|}}}
|sep={{{sep|;}}}
+
|val={{{4|}}}
|grpsep={{{grpsep|/\}}}
+
|sep={{{sep|;}}}
}}<!--
+
|grpsep={{{grpsep|/\}}}
-->}}<!--
+
}}
-->{{#if: {{{6|}}}
+
}}<!--
| {{PropVals/Group/NextPart
+
-->{{#if: {{{5|}}}
|preval={{{5|}}}
+
| {{PropVals/Group/NextPart
|val={{{6|}}}
+
|preval={{{4|}}}
|sep={{{sep|;}}}
+
|val={{{5|}}}
|grpsep={{{grpsep|/\}}}
+
|sep={{{sep|;}}}
}}<!--
+
|grpsep={{{grpsep|/\}}}
-->}}<!--
+
}}
-->{{#if: {{{7|}}}
+
}}<!--
| {{PropVals/Group/NextPart
+
-->{{#if: {{{6|}}}
|preval={{{6|}}}
+
| {{PropVals/Group/NextPart
|val={{{7|}}}
+
|preval={{{5|}}}
|sep={{{sep|;}}}
+
|val={{{6|}}}
|grpsep={{{grpsep|/\}}}
+
|sep={{{sep|;}}}
}}<!--
+
|grpsep={{{grpsep|/\}}}
-->}}<!--
+
}}
-->{{#if: {{{8|}}}
+
}}<!--
| {{PropVals/Group/NextPart
+
-->{{#if: {{{7|}}}
|preval={{{7|}}}
+
| {{PropVals/Group/NextPart
|val={{{8|}}}
+
|preval={{{6|}}}
|sep={{{sep|;}}}
+
|val={{{7|}}}
|grpsep={{{grpsep|/\}}}
+
|sep={{{sep|;}}}
}}<!--
+
|grpsep={{{grpsep|/\}}}
-->}}<!--
+
}}
-->{{#if: {{{9|}}}
+
}}<!--
| {{PropVals/Group/NextPart
+
-->{{#if: {{{8|}}}
|preval={{{8|}}}
+
| {{PropVals/Group/NextPart
|val={{{9|}}}
+
|preval={{{7|}}}
|sep={{{sep|;}}}
+
|val={{{8|}}}
|grpsep={{{grpsep|/\}}}
+
|sep={{{sep|;}}}
}}<!--
+
|grpsep={{{grpsep|/\}}}
-->}}<!--
+
}}
-->{{#if: {{{10|}}}
+
}}<!--
| {{PropVals/Group/NextPart
+
-->{{#if: {{{9|}}}
|preval={{{9|}}}
+
| {{PropVals/Group/NextPart
|val={{{10|}}}
+
|preval={{{8|}}}
|sep={{{sep|;}}}
+
|val={{{9|}}}
|grpsep={{{grpsep|/\}}}
+
|sep={{{sep|;}}}
}}<!--
+
|grpsep={{{grpsep|/\}}}
-->}}<!--
+
}}
-->{{#if: {{{11|}}} |
+
}}<!--
{{{grpsep|/\}}}<!--
+
-->{{#if: {{{10|}}}
--><dl class="error"><!--
+
| {{PropVals/Group/NextPart
--><dt>PropVals/Group:<!--
+
|preval={{{9|}}}
--><dd>You need to expand the #args of this template to process this many arguments !<!--
+
|val={{{10|}}}
--><dd>Overflowing argument was: {{{11}}}<!--
+
|sep={{{sep|;}}}
--></dl><!--
+
|grpsep={{{grpsep|/\}}}
-->}}
+
}}
 +
}}<!--
 +
-->{{#if: {{{11|}}}
 +
| {{PropVals/Group/NextPart
 +
|preval={{{10|}}}
 +
|val={{{11|}}}
 +
|sep={{{sep|;}}}
 +
|grpsep={{{grpsep|/\}}}
 +
}}
 +
}}<!--
 +
-->{{#if: {{{12|}}}
 +
| {{PropVals/Group/NextPart
 +
|preval={{{11|}}}
 +
|val={{{12|}}}
 +
|sep={{{sep|;}}}
 +
|grpsep={{{grpsep|/\}}}
 +
}}
 +
}}<!--
 +
-->{{#if: {{{13|}}}
 +
| {{PropVals/Group/NextPart
 +
|preval={{{12|}}}
 +
|val={{{13|}}}
 +
|sep={{{sep|;}}}
 +
|grpsep={{{grpsep|/\}}}
 +
}}
 +
}}<!--
 +
-->{{#if: {{{14|}}}
 +
| {{PropVals/Group/NextPart
 +
|preval={{{13|}}}
 +
|val={{{14|}}}
 +
|sep={{{sep|;}}}
 +
|grpsep={{{grpsep|/\}}}
 +
}}
 +
}}<!--
 +
-->{{#if: {{{15|}}}
 +
| {{PropVals/Group/NextPart
 +
|preval={{{14|}}}
 +
|val={{{15|}}}
 +
|sep={{{sep|;}}}
 +
|grpsep={{{grpsep|/\}}}
 +
}}
 +
}}<!--
 +
-->{{#if: {{{16|}}}
 +
| {{PropVals/Group/NextPart
 +
|preval={{{15|}}}
 +
|val={{{16|}}}
 +
|sep={{{sep|;}}}
 +
|grpsep={{{grpsep|/\}}}
 +
}}
 +
}}<!--
 +
-->{{#if: {{{17|}}}
 +
| {{PropVals/Group/NextPart
 +
|preval={{16|}}}
 +
|val={{{17|}}}
 +
|sep={{{sep|;}}}
 +
|grpsep={{{grpsep|/\}}}
 +
}}
 +
}}<!--
 +
-->{{#if: {{{18|}}}
 +
| {{PropVals/Group/NextPart
 +
|preval={{17|}}}
 +
|val={{{18|}}}
 +
|sep={{{sep|;}}}
 +
|grpsep={{{grpsep|/\}}}
 +
}}
 +
}}<!--
 +
-->{{#if: {{{19|}}}
 +
| {{PropVals/Group/NextPart
 +
|preval={{18|}}}
 +
|val={{{19|}}}
 +
|sep={{{sep|;}}}
 +
|grpsep={{{grpsep|/\}}}
 +
}}
 +
}}<!--
 +
-->{{#if: {{{20|}}}
 +
| {{PropVals/Group/NextPart
 +
|preval={{{19|}}}
 +
|val={{{20|}}}
 +
|sep={{{sep|;}}}
 +
|grpsep={{{grpsep|/\}}}
 +
}}
 +
}}<!--
 +
-->{{#if: {{{21|}}}
 +
| {{{grpsep|/\}}}<!--
 +
--><dl class="error"><!--
 +
--><dt>PropVals/Group:<!--
 +
--><dd>You need to expand the #args of this template to process this many arguments !<!--
 +
--><dd>Overflowing argument was: {{{21}}}<!--
 +
--></dl>
 
}}</onlyinclude><noinclude>{{documentation}}</noinclude>
 
}}</onlyinclude><noinclude>{{documentation}}</noinclude>

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

  1. {{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