Difference between revisions of "Template:PrintTopicAcceptedTheoriesList"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This template is used to print the accepted theories on this topic in a bullet point list. The output will say that theory A is accepted by community X, and theory B is accepted by community Y.  
+
This template is used to print a list of accepted theories on this topic. It looks for the accepted theories on the topic and then indicates which communities it is currently accepted by.
  
 
'''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.
 
'''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.
Line 9: Line 9:
 
* <code><nowiki>|outro=</nowiki></code> - text that is appended to 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.
 
* <code><nowiki>|default=</nowiki></code> - if, for any reason, the query returns no results, this will be printed instead.
* <code><nowiki>|details=</nowiki></code> - if ''yes'', then details of the theory are added to each record.
+
* <code><nowiki>|details=</nowiki></code> - if ''yes'', then details of the theory such as its formulation and diagram are added to each record.
* <code><nowiki>|bullets=</nowiki></code> - if ''yes'', a bullet-list will be produced; otherwise (default) the list will simply start from a new line.
+
* <code><nowiki>|bullets=</nowiki></code> - if ''yes'', a bullet-list will be produced.
  
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
 
-->{{#if: {{{topic|}}} |<!--
 
-->{{#if: {{{topic|}}} |<!--
  -->{{#ask:<!--  
+
--><!-- get the theories first
  -->[[SubObjectCategory::Acceptance Record]]<!--  
+
  -->{{#arraydefine: varAccTheories<!--
  -->[[Topic::{{{topic|}}}]]<!--  
+
  -->|{{#ask:<!--
  -->[[Still Accepted::true]]<!--  
+
    -->[[SubObjectCategory::Acceptance Record]]<!--
  -->|?Community<!--
+
    -->[[Topic::{{{topic|}}}]]<!--
  -->|?Theory<!--
+
    -->[[Still Accepted::true]]<!--  
  -->|?Accepted From<!--
+
    -->|?Theory<!--
  -->|?Accepted From Approximate<!--
+
    -->|link=none<!--
   -->|intro={{{intro|}}}<!--
+
    -->|limit=10000<!--
  -->|outro={{{outro|}}}<!--
+
  -->}}<!--
  -->|default={{{default|}}}<!--
+
   -->| , |unique<!--
  -->|mainlabel=-<!--
+
-->}}<!-- arraydefine
   -->|format=template<!--
+
--><!--
   -->|link=none<!--
+
--><!-- remove duplicates
  -->|sort=Community,Accepted From<!--
+
-->{{#arrayunique: varAccTheories}}<!--
  -->|order=ascending<!--
+
--><!--
  -->|template={{#ifeq: {{{details|}}}|yes<!--
+
-->{{#switch: {{#arraysize: varAccTheories}}<!--
            -->|{{#ifeq: {{{bullets|}}}|yes|TopicAcceptedTheories-detail-ul-format|TopicAcceptedTheories-detail-plain-format}}<!--
+
   -->|0={{{default|}}}<!--
            -->|{{#ifeq: {{{bullets|}}}|yes|TopicAcceptedTheories-ul-format|TopicAcceptedTheories-plain-format}}<!--
+
   -->|{{{intro|}}}<!--
            -->}}<!--
+
  -->{{#arrayprint: varAccTheories<!--
  -->}}<!-- ask
+
    -->||@@@@<!--
-->}}<!-- topic
+
    -->|<nowiki/>
 +
{{#ifeq: {{{bullets|}}}|yes|*<nowiki> </nowiki>|}}{{PrintTheoryCurrentlyAcceptedInCommunities|theory=@@@@|pretty=yes}}<!--
 +
    -->{{#ifeq: {{{details|}}}|yes|<!--
 +
    --><!--  
 +
    --><nowiki/>: {{#show: @@@@|?Formulation Text|link=none}}<!--  
 +
    --><!--
 +
    --><!-- add image if exists  Formulation File
 +
    -->{{#if: {{#show: @@@@|?Formulation File|link=none}}|<nowiki/>
 +
 
 +
{{PrintDiagramFile|diagram file={{#show: @@@@|?Formulation File|link=none}}|}}
 +
<nowiki/>
 +
<!--
 +
    -->}}<!-- if diagram
 +
    -->}}<!-- if details
 +
  -->}}<!--arrayprint
 +
  -->{{{outro|}}}<!--
 +
  -->}}<!-- switch
 +
--><!--
 +
-->}}<!-- if
 
--></includeonly>
 
--></includeonly>

Revision as of 14:23, 31 August 2016

This template is used to print a list of accepted theories on this topic. It looks for the accepted theories on the topic and then indicates which communities it is currently accepted by.

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

Parameters:

  • |topic= - the theory.
  • |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.
  • |details= - if yes, then details of the theory such as its formulation and diagram are added to each record.
  • |bullets= - if yes, a bullet-list will be produced.