Difference between revisions of "Template:PropVals/Group/NextPart/doc"
From Salem Wiki
< Template:PropVals | Group | NextPart
m (→Examples: adding 1st-call examples) |
m (→Description: updated with more detail) |
||
Line 1: | Line 1: | ||
==Description== | ==Description== | ||
− | :This template is used, as a helper-template | + | :This template is used, as a helper-template by {{t|PropVals/Group}}, to output a '''''grouped-records'''''. |
− | :These ''grouped-records'' begin with the ''group- | + | :These '''''grouped-records''''' begin with the ''group-heading'' followed by '''''entries'''''. |
− | :The ''heading | + | :The ''group-heading'' in the output is the ''heading-field'' prepended with "heading=" to allow {{t|PropVals/List}} to recognize it as the ''group-heading'' tobe used. |
− | :It uses {{t|PropVals/Group/heading}} to | + | :An '''''entry''''' is a '''''record''''' with its heading-field removed, that has the same heading-field as the previous '''''record'''''. |
+ | :It uses {{t|PropVals/Group/heading}} and {{t|PropVals/Split}} to separate the ''fields'' in a '''''record'''''. | ||
==Syntax== | ==Syntax== |
Revision as of 13:32, 26 June 2012
Description
- This template is used, as a helper-template by {{PropVals/Group}}, to output a grouped-records.
- These grouped-records begin with the group-heading followed by entries.
- The group-heading in the output is the heading-field prepended with "heading=" to allow {{PropVals/List}} to recognize it as the group-heading tobe used.
- An entry is a record with its heading-field removed, that has the same heading-field as the previous record.
- It uses {{PropVals/Group/heading}} and {{PropVals/Split}} to separate the fields in a record.
Syntax
- Type the below code somewhere inside your code:
{{PropVals/Group/NextPart |preval=<previous record> |val=<current record> |sep={{{sep|;}}} |grpsep={{{grpsep|/\}}} }}
Examples
- {{PropVals/Group/NextPart|val=Objectname;Amount|sep={{{sep|;}}}|grpsep={{{grpsep|/\}}}}}
gives:
Objectname;Amount - {{PropVals/Group/NextPart|val=Objectname;Amount;Groupheading|sep={{{sep|;}}}|grpsep={{{grpsep|/\}}}}}
gives:
heading=Groupheading|Objectname;Amount - {{PropVals/Group/NextPart|preval=Objectname;Amount;Groupheading|val=Objectname;Amount;Groupheading|sep={{{sep|;}}}|grpsep={{{grpsep|/\}}}}}
gives:
|Objectname;Amount - {{PropVals/Group/NextPart|preval=Objectname;Amount;Grouphead|val=Objectname;Amount;Groupheading|sep={{{sep|;}}}|grpsep={{{grpsep|/\}}}}}
gives:
/\heading=Groupheading|Objectname;Amount