Difference between revisions of "Template:GetPropertyValues"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
Line 7: Line 7:
 
* <code><nowiki>|object=</nowiki></code> - the fullpagename of the modification.
 
* <code><nowiki>|object=</nowiki></code> - the fullpagename of the modification.
 
* <code><nowiki>|property=</nowiki></code> - the property to return.
 
* <code><nowiki>|property=</nowiki></code> - the property to return.
 +
* <code><nowiki>|intro=</nowiki></code> - the text that should precede the list, e.g. "Here are the major topics tackled by this author:".
 
* <code><nowiki>|link=</nowiki></code> - determines whether the values are to be printer as links to the respective pages (where available); possible values are ''none'', ''subject'', ''all''. If not given ''all'' is the default.
 
* <code><nowiki>|link=</nowiki></code> - determines whether the values are to be printer as links to the respective pages (where available); possible values are ''none'', ''subject'', ''all''. If not given ''all'' is the default.
 
* <code><nowiki>|pretty=</nowiki></code> - if non empty, a ''pretty'' list is produced where the last two elements are chained with an ''and'' (or the local languages equivalent).
 
* <code><nowiki>|pretty=</nowiki></code> - if non empty, a ''pretty'' list is produced where the last two elements are chained with an ''and'' (or the local languages equivalent).
Line 22: Line 23:
 
-->}}<!--
 
-->}}<!--
 
--><!--
 
--><!--
-->{{#if: {{{pretty|}}}<!--
+
--><!--
-->|{{#arrayprint: values||@@@@|@@@@|print=pretty}}<!--
+
-->{{#switch: {{#arraysize: values}}<!--
-->|{{#arrayprint: values|,&#32;|@@@@|@@@@}}<!--
+
-->|0=<!--
 +
-->|{{{intro|}}}<!--
 +
  -->{{#if: {{{pretty|}}}<!--
 +
  -->|{{#arrayprint: values||@@@@|@@@@|print=pretty}}<!--
 +
  -->|{{#arrayprint: values|,&#32;|@@@@|@@@@}}<!--
 +
  -->}}<!--
 
-->}}<!--
 
-->}}<!--
 
--><!--
 
--><!--
 
--></includeonly>
 
--></includeonly>

Revision as of 01:07, 19 August 2016

This template is used to return all the values of a given object's property.

NOTE: As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.

Parameters:

  • |object= - the fullpagename of the modification.
  • |property= - the property to return.
  • |intro= - the text that should precede the list, e.g. "Here are the major topics tackled by this author:".
  • |link= - determines whether the values are to be printer as links to the respective pages (where available); possible values are none, subject, all. If not given all is the default.
  • |pretty= - if non empty, a pretty list is produced where the last two elements are chained with an and (or the local languages equivalent).