Difference between revisions of "Template:PropVals/Group/NextPart/doc"
From Salem Wiki
< Template:PropVals | Group | NextPart
(Initial setup) |
m (adding documentation) |
||
Line 1: | Line 1: | ||
==Description== | ==Description== | ||
− | :This template is used | + | :This template is used as a helper-template inside {{t|PropVals/Group}} |
− | : | + | :It is used to prepend the output, with the ''heading-field'' including the group-separator, when the ''heading-field'' of the current-record differs from the one in the previous-record. |
− | |||
==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|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> |
Revision as of 15:31, 23 June 2012
Description
- This template is used as a helper-template inside {{PropVals/Group}}
- It is used to prepend the output, with the heading-field including the group-separator, when the heading-field of the current-record differs from the one in the previous-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|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