Difference between revisions of "Template:GetPropertyValuesList"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
Line 14: Line 14:
  
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
-->{{#ask: [[{{{object|}}}]]<!--
+
-->{{#arraydefine: values<!--
  -->|mainlabel=-<!--
+
-->|{{#ask: [[{{{object|}}}]]<!--
  -->|headers=hide<!--
+
  -->|mainlabel=-<!--
  -->|link={{{link|}}}<!--
+
  -->|headers=hide<!--
  -->|?{{{property|}}}<!--
+
  -->|link={{{link|}}}<!--
  -->|default={{{default|}}}<!--
+
  -->|?{{{property|}}}<!--
   -->|intro={{{intro|}}}<!--
+
  -->|limit=10000<!--
  -->|outro={{{outro|}}}<!--
+
   -->}}<!--
  -->|format=template<!--
+
-->| , |unique<!--
  -->|template={{#ifeq: {{{bullets|}}}|yes|GetPropertyValuesList-ul-format|GetPropertyValuesList-plain-format|}}<!--
 
  -->|limit=10000<!--
 
  -->|sep=,<!--
 
 
-->}}<!--
 
-->}}<!--
 +
--><!--
 +
--><!--
 +
-->{{#switch: {{#arraysize: values}}<!--
 +
-->|0={{{default|}}}<!--
 +
-->|{{{intro|}}}<!--
 +
  -->{{#arrayprint: values||@@@@|<nowiki/>
 +
{{#ifeq: {{{bullets|}}}|yes|* |}}@@@@<!--
 +
  -->}}<!--
 +
  -->{{{outro|}}}<!--
 +
-->}}<!--
 +
--><!--
 
--></includeonly>
 
--></includeonly>

Revision as of 19:02, 2 November 2016

This template is used to return all the values of a given object's property in a vertical list (bullets are optional).

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 object.
  • |property= - the property to return.
  • |intro= - initial text that precedes the output, if at least some results exist.
  • |outro= - text that is appended to the output, if at least some results exist.
  • |default= - if, for any reason, the query returns no results, this will be printed instead.
  • |link= - determines whether the values are to be printed as links to the respective pages (where available); possible values are none, subject, all. If not given all is the default.
  • |bullets= - if yes, bullets will appear before every value.