Difference between revisions of "Template:PropVals/Group/NextPart/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 as a helper-template inside {{t|PropVals/Group}}
:;See these pages for documentation on functions used<nowiki>:</nowiki>
+
: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 on a page:
+
: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

  1. {{PropVals/Group/NextPart|preval=Objectname;Amount;Groupheading|val=Objectname;Amount;Groupheading|sep={{{sep|;}}}|grpsep={{{grpsep|/\}}}}}
    gives:
    |Objectname;Amount
  2. {{PropVals/Group/NextPart|preval=Objectname;Amount;Grouphead|val=Objectname;Amount;Groupheading|sep={{{sep|;}}}|grpsep={{{grpsep|/\}}}}}
    gives:
    /\heading=Groupheading|Objectname;Amount