Difference between revisions of "Template:PrintModificationQuestionsAnswered"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
Line 6: Line 6:
 
'''Parameters:'''
 
'''Parameters:'''
 
* <code><nowiki>|modification=</nowiki></code> - the modification that attempts to answer questions.
 
* <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: {{{modification|}}} |<!--
 
--><!-- add intro
 
-->{{{intro|}}}<!--
 
 
--><!-- add the questions
 
--><!-- add the questions
-->{{#arraydefine:questionsArray|{{GetPropertyValues|object={{{modification|}}}|property=Answers Question|link=none}} }}<!--
+
-->{{#arraydefine: questionsArray|{{GetPropertyValues|object={{{modification|}}}|property=Answers Question|link=none}} }}<!--
-->{{#arrayprint:questionsArray||@@@@|{{#if:@@@@|<nowiki/>
+
--><!--
 +
-->{{#switch: {{#arraysize: questionsArray}} <!--
 +
-->|0={{{default|}}}<!--
 +
-->|{{{intro|}}}<!--
 +
  -->{{#arrayprint:questionsArray||@@@@|{{#if:@@@@|<nowiki/>
 
* [[@@@@]]: {{#show:@@@@|?Question}}|}}  
 
* [[@@@@]]: {{#show:@@@@|?Question}}|}}  
 
}}<!--
 
}}<!--
-->}}</includeonly>
+
  -->{{{outro|}}}<!--
 +
-->}}<!--
 +
--></includeonly>

Revision as of 20:51, 19 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.