Difference between revisions of "Template:GetPropertyValuesList"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
 
(18 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
 
'''Parameters:'''
 
'''Parameters:'''
* <code><nowiki>|object=</nowiki></code> - the fullpagename of the modification.
+
* <code><nowiki>|object=</nowiki></code> - the fullpagename of the object.
 
* <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>|intro=</nowiki></code> - initial text that precedes the output, if at least some results exist.
* <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>|outro=</nowiki></code> - text that is appended to the output, if at least some results exist.
* <code><nowiki>|bullets=</nowiki></code> - if not empty, bullets will appear before every value.
+
* <code><nowiki>|default=</nowiki></code> - if, for any reason, the query returns no results, this will be printed instead.
 +
* <code><nowiki>|link=</nowiki></code> - 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.
 +
* <code><nowiki>|bullets=</nowiki></code> - if ''yes'', bullets will appear before every value.
 +
* <code><nowiki>|order=</nowiki></code> - ''ascending''/''asc'', ''descending''/''desc''/''reverse'', ''random''/''rand'' or a list of those if more than one property is used for sorting.
  
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
Line 20: Line 23:
 
   -->|limit=10000<!--
 
   -->|limit=10000<!--
 
   -->}}<!--
 
   -->}}<!--
  -->|# |unique<!--
+
  -->| , |unique<!--
 
-->}}<!--
 
-->}}<!--
 
--><!--
 
--><!--
 
--><!--
 
--><!--
 
-->{{#switch: {{#arraysize: values}}<!--
 
-->{{#switch: {{#arraysize: values}}<!--
  -->|0=<!--
+
  -->|0={{{default|}}}<!--
  -->|{{{intro|}}}{{#arrayprint: values||@@@@|{{#if: {{{bullets|}}}|* |}}@@@@
+
  -->|{{{intro|}}}<!--
<br/>}}<!--
+
  -->{{#arraysort: values|{{{order|none}}}}}<!--
 +
  -->{{#arrayprint: values||@@@@|<nowiki/>
 +
{{#ifeq: {{{bullets|}}}|yes|* |}}@@@@{{#ifeq: {{{bullets|}}}|yes||<br/>}}<!--
 +
  -->}}<!--
 +
  -->{{{outro|}}}<!--
 
-->}}<!--
 
-->}}<!--
 
--><!--
 
--><!--
 
--></includeonly>
 
--></includeonly>

Latest revision as of 16:31, 4 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.
  • |order= - ascending/asc, descending/desc/reverse, random/rand or a list of those if more than one property is used for sorting.