Difference between revisions of "Template:PropVals/doc"

From Salem Wiki
Jump to: navigation, search
m (→‎Functional logic: update with more detailed info)
Line 21: Line 21:
 
*#{{t|PropVals/getGroupedRecords}} is used as a wrapper to inject extra arguments into {{t|PropVals/Group}}, using the output of {{t|PropVals/getRecords}} as input, to output '''''grouped-records''''', for further processing by {{t|PropVals}}.
 
*#{{t|PropVals/getGroupedRecords}} is used as a wrapper to inject extra arguments into {{t|PropVals/Group}}, using the output of {{t|PropVals/getRecords}} as input, to output '''''grouped-records''''', for further processing by {{t|PropVals}}.
 
*##{{t|PropVals/Group}} is used as a wrapper to inject extra arguments into {{t|PropVals/Group/NextPart}}, using '''''records''''' as input, to output '''''grouped-records'''''.
 
*##{{t|PropVals/Group}} is used as a wrapper to inject extra arguments into {{t|PropVals/Group/NextPart}}, using '''''records''''' as input, to output '''''grouped-records'''''.
*##*{{t|PropVals/Group/NextPart}} is used as a helper-template, to output a '''''grouped-record''''' that starts with the ''group-heading'' followed by '''''entries''''', with their heading-field removed, that have the same heading-field as the previous '''''entry'''''.  
+
*##*{{t|PropVals/Group/NextPart}} is used as a helper-template, to output a '''''grouped-record''''' that starts with the ''group-heading'' followed by '''''entries'''''.
 +
*##*: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 the '''''record'''''.
 
*##*:It uses {{t|PropVals/Group/heading}} and {{t|PropVals/Split}} to separate the ''fields'' in the '''''record'''''.
 
*##*:The structure of a '''''record''''' is: <code><nowiki>Objectname{{{sep}}}Amount{{{sep}}}Groupheading</nowiki></code>
 
*##*:The structure of a '''''record''''' is: <code><nowiki>Objectname{{{sep}}}Amount{{{sep}}}Groupheading</nowiki></code>

Revision as of 13:20, 26 June 2012

Description

This is the main-entry-point of a complex template-class
It is used to automatically list all the values of a property of a page as an un-ordered list.
This generated-output will be used in {{Infobox}} to automatically show relevant info.
See these pages for documentation on functions used:
Other pages with relevant info are:

Functional logic

Syntax

Type the below code somewhere inside {{Infobox}} or a page:
{{PropVals |prop=RequiresObj |page={{FULLPAGENAME}} |sep={{{sep|;}}} |grpsep={{{grpsep|/\}}} |showamount={{{showamount|no}}} }}

Examples

  1. {{PropVals|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata|showamount=y}} gives:
    • {{PropVals|prop=RequiresObj|page=User:©TriMoon™/PropVals testdata|showamount=y|debug=y}} gives:

      Sub-templates