Difference between revisions of "Template:PropVals/Group/NextPart/doc"
From Salem Wiki
< Template:PropVals | Group | NextPart
(Initial setup) |
m (Protected "Template:PropVals/Group/NextPart/doc": Documentation of key-feature ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Description== | ==Description== | ||
− | :This template is used to. | + | :This template is used, as a helper-template by {{t|PropVals/Group}}, to output '''''grouped-records'''''. |
− | : | + | :These '''''grouped-records''''' begin with the ''group-heading'' followed by '''''entries'''''. |
− | : | + | :The ''group-heading'' in the output is <code><nowiki>{{{grpsep}}}heading=</nowiki></code> followed by the ''heading-field'', to allow {{t|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 {{t|PropVals/Group/heading}} and {{t|PropVals/Split}} to separate the ''fields'' in a '''''record'''''. | ||
+ | :The structure of a '''''record''''' is: <code><nowiki>Objectname{{{sep}}}Amount{{{sep}}}Groupheading</nowiki></code> | ||
==Syntax== | ==Syntax== | ||
− | :Type the below code somewhere | + | :Type the below code somewhere inside your code: |
− | <pre>{{}}</pre> | + | <pre>{{PropVals/Group/NextPart |
+ | |preval=<previous record> | ||
+ | |val=<current record> | ||
+ | |sep={{{sep|;}}} | ||
+ | |grpsep={{{grpsep|/\}}} | ||
+ | }}</pre> | ||
==Examples== | ==Examples== | ||
− | # | + | #{{t|PropVals/Group/NextPart|val<nowiki>=</nowiki>Objectname{{{sep|;}}}Amount|sep<nowiki>={{{sep|;}}}</nowiki>|grpsep<nowiki>={{{grpsep|/\}}}</nowiki>}}<br/>gives:<br/>{{PropVals/Group/NextPart |
+ | |val=Objectname{{{sep|;}}}Amount | ||
+ | |sep={{{sep|;}}} | ||
+ | |grpsep={{{grpsep|/\}}} | ||
+ | }} | ||
+ | #{{t|PropVals/Group/NextPart|val<nowiki>=</nowiki>Objectname{{{sep|;}}}Amount{{{sep|;}}}Groupheading|sep<nowiki>={{{sep|;}}}</nowiki>|grpsep<nowiki>={{{grpsep|/\}}}</nowiki>}}<br/>gives:<br/>{{PropVals/Group/NextPart | ||
+ | |val=Objectname{{{sep|;}}}Amount{{{sep|;}}}Groupheading | ||
+ | |sep={{{sep|;}}} | ||
+ | |grpsep={{{grpsep|/\}}} | ||
+ | }} | ||
+ | #{{t|PropVals/Group/NextPart|preval<nowiki>=</nowiki>Objectname{{{sep|;}}}Amount{{{sep|;}}}Groupheading|val<nowiki>=</nowiki>Objectname{{{sep|;}}}Amount{{{sep|;}}}Groupheading|sep<nowiki>={{{sep|;}}}</nowiki>|grpsep<nowiki>={{{grpsep|/\}}}</nowiki>}}<br/>gives:<br/>{{PropVals/Group/NextPart | ||
+ | |preval=Objectname{{{sep|;}}}Amount{{{sep|;}}}Groupheading | ||
+ | |val=Objectname{{{sep|;}}}Amount{{{sep|;}}}Groupheading | ||
+ | |sep={{{sep|;}}} | ||
+ | |grpsep={{{grpsep|/\}}} | ||
+ | }} | ||
+ | #{{t|PropVals/Group/NextPart|preval<nowiki>=</nowiki>Objectname{{{sep|;}}}Amount{{{sep|;}}}Grouphead|val<nowiki>=</nowiki>Objectname{{{sep|;}}}Amount{{{sep|;}}}Groupheading|sep<nowiki>={{{sep|;}}}</nowiki>|grpsep<nowiki>={{{grpsep|/\}}}</nowiki>}}<br/>gives:<br/>{{PropVals/Group/NextPart | ||
+ | |preval=Objectname{{{sep|;}}}Amount{{{sep|;}}}Grouphead | ||
+ | |val=Objectname{{{sep|;}}}Amount{{{sep|;}}}Groupheading | ||
+ | |sep={{{sep|;}}} | ||
+ | |grpsep={{{grpsep|/\}}} | ||
+ | }} | ||
<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:10, 25 July 2012
Description
- This template is used, as a helper-template by {{PropVals/Group}}, to output grouped-records.
- These grouped-records begin with the group-heading followed by entries.
- The group-heading in the output is
{{{grpsep}}}heading=
followed by the heading-field, 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.
- The structure of a record is:
Objectname{{{sep}}}Amount{{{sep}}}Groupheading
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