Difference between revisions of "Template:PropVals/Group/doc"

From Salem Wiki
Jump to: navigation, search
(Initial setup)
 
m (adding documentation)
Line 1: Line 1:
 
==Description==
 
==Description==
:This template is used to.
+
:This template is used to output a ''grouped-record'' that starts with the ''heading-field'' followed by ''records'', with their ''heading-field'' removed, that have the same ''heading-field'' as the previous record.
:;See these pages for documentation on functions used<nowiki>:</nowiki>
+
:It will automatically separate these ''grouped-records'' with a ''group-separator'' using {{t|PropVals/Group/NextPart}} to output these ''grouped-records''.
:*
+
:This is a wrapper-template to feed individual ''records'' to its helper-templates, 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==
 
==Syntax==
:Type the below code somewhere on a page:
+
:Type the below code somewhere inside your code:
<pre>{{}}</pre>
+
<pre>{{PropVals/Group |sep={{{sep|;}}} |grpsep={{{grpsep|/\}}} |<record>|<record>|<record>|etc...}}</pre>
 
==Examples==
 
==Examples==
#
+
#{{t|PropVals/Group|sep<nowiki>={{{sep|;}}}</nowiki>|grpsep<nowiki>={{{grpsep|/\}}}</nowiki>|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}}<br/>gives:<br/>{{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
 +
}}
 
<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>

Revision as of 16:18, 23 June 2012

Description

This template is used to output a grouped-record that starts with the heading-field followed by records, with their heading-field removed, that have the same heading-field as the previous record.
It will automatically separate these grouped-records with a group-separator using {{PropVals/Group/NextPart}} to output these grouped-records.
This is a wrapper-template to feed individual records to its helper-templates, 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