Difference between revisions of "Template:PropVals"

From Salem Wiki
Jump to: navigation, search
m (allowing optional parameters to propagate more into called templates)
m (Changed protection level for "Template:PropVals": images get protected also, so no cascade :/ ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<onlyinclude><!--
 
<onlyinclude><!--
 
--><ul><!--
 
--><ul><!--
-->{{#arraymap:
+
-->{{#if: {{{debug|}}}
{{PropVals/getGroupedRecords
+
| {{#arraymap:
|prop={{{prop|RequiresObj}}}
+
{{PropVals/getGroupedRecords
|page={{{page|{{FULLPAGENAME}} }}}
+
|prop={{{prop|RequiresObj}}}
|sep={{{sep|;}}}
+
|page={{{page|{{FULLPAGENAME}} }}}
|grpsep={{{grpsep|/\}}}
+
|sep={{{sep|;}}}
 +
|grpsep={{{grpsep|/\}}}
 +
}}
 +
| {{{grpsep|/\}}}
 +
| xXx
 +
| <li><nowiki>{{</nowiki>PropVals/List{{!}}sep<nowiki>=</nowiki>{{{sep|;}}}{{!}}showamount<nowiki>=</nowiki>{{{showamount|no}}}{{!}}xXx<nowiki>}}</nowiki><ul>{{PropVals/List|sep={{{sep|;}}}|showamount={{{showamount|no}}}|xXx}}</ul></li>
 +
|
 +
}}
 +
| {{#arraymap:
 +
{{PropVals/getGroupedRecords
 +
|prop={{{prop|RequiresObj}}}
 +
|page={{{page|{{FULLPAGENAME}} }}}
 +
|sep={{{sep|;}}}
 +
|grpsep={{{grpsep|/\}}}
 +
}}
 +
| {{{grpsep|/\}}}
 +
| xXx
 +
| {{PropVals/List|sep={{{sep|;}}}|showamount={{{showamount|no}}}|xXx}}
 +
|
 
}}
 
}}
| {{{grpsep|/\}}}
 
| x
 
| {{PropVals/List|sep={{{sep|;}}}|x}}
 
|
 
 
}}<!--
 
}}<!--
 
--></ul><!--
 
--></ul><!--
 
--></onlyinclude><noinclude>{{documentation}}</noinclude>
 
--></onlyinclude><noinclude>{{documentation}}</noinclude>

Latest revision as of 18:09, 25 July 2012


    Template documentation (for the template shown above, sometimes hidden or invisible)

    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=Help:Infobox/testdata|showamount=y}} gives:
      • {{PropVals|prop=RequiresObj|page=Help:Infobox/testdata|showamount=y|debug=y}} gives:

        Sub-templates


        Visit Template:PropVals/doc to edit this text! (How does this work?)