Difference between revisions of "Template:PrintModificationQuestionsAnswered"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
 
'''Parameters:'''
 
'''Parameters:'''
* <code><nowiki>|modification=</nowiki></code> - the questions that should be printed. A comma delimited list of questions each one of which is a Topic page.
+
* <code><nowiki>|modification=</nowiki></code> - the modification that attempts to answer questions.
* <code><nowiki>|intro=</nowiki></code> - if the results need to have a preceding text, write it here.
+
* <code><nowiki>|intro=</nowiki></code> - initial text that precedes the output, if at least some results exist.
 +
* <code><nowiki>|outro=</nowiki></code> - text that is appended to the output, if at least some results exist.
 +
* <code><nowiki>|default=</nowiki></code> - if, for any reason, the query returns no results, this will be printed instead.
  
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
-->{{#if: {{{questions|}}} |<!--
 
--><!-- add intro
 
-->{{{intro|}}}<!--
 
 
--><!-- add the questions
 
--><!-- add the questions
-->{{#arraydefine:questionsArray|{{GetPropertyValues|object={{{modification|}}}|property=Answers Question}} }}<!--
+
-->{{#arraydefine: questionsArray|{{GetPropertyValues|object={{{modification|}}}|property=Answers Question|link=none}} }}<!--
-->{{#arrayprint:questionsArray||@@@@|{{#if:@@@@|<nowiki/>
+
--><!--
* [[@@@@]]: {{#show:@@@@|?Question}}|}}  
+
-->{{#switch: {{#arraysize: questionsArray}} <!--
}}<!--
+
-->|0={{{default|}}}<!--
-->}}</includeonly>
+
-->|{{{intro|}}}<!--
 +
  -->{{#arrayprint:questionsArray||@@@@|{{#if:@@@@|<nowiki/>
 +
* [[@@@@]]: {{#show:@@@@|?Question}}|}}<!--
 +
  -->}}<!-- print
 +
  -->{{{outro|}}}<!--
 +
-->}}<!--
 +
--></includeonly>

Latest revision as of 23:01, 30 August 2016

Use this template to display the questions/problems that a modification attempts to solve.

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

Parameters:

  • |modification= - the modification that attempts to answer questions.
  • |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.