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 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. There are several ways this can be printed depending on the parameters.
+
This template is used to print a list of accepted theories on this topic. It displays the theories accepted on a given topic. There are several ways this can be printed depending on the parameters. The print out consists of two main parts:
  
'''Option 1''': (if <code><nowiki>groupbycommunity=yes</nowiki></code>)
+
'''Part 1. Summary''': A short statement of which theories are accepted in which community. This can be done in two options depending on the value of <code><nowiki>groupbycommunity</nowiki></code>:
 +
 
 +
''Option 1'': (if <code><nowiki>groupbycommunity=yes</nowiki></code>)
 
* Community A: Theory 1, Theory 2, Theory 3
 
* Community A: Theory 1, Theory 2, Theory 3
 
* Community B: Theory 2, Theory 3, Theory 4
 
* Community B: Theory 2, Theory 3, Theory 4
 
* Community C: Theory 1, Theory 3, Theory 5
 
* Community C: Theory 1, Theory 3, Theory 5
  
'''Option 2''': (if <code><nowiki>groupbycommunity=no</nowiki></code> or empty)
+
''Option 2'': (if <code><nowiki>groupbycommunity=no</nowiki></code> or empty)
 
* Theory 1: Community A, Community C
 
* Theory 1: Community A, Community C
 
* Theory 2: Community A, Community B
 
* Theory 2: Community A, Community B
Line 13: Line 15:
 
* Theory 4: Community B
 
* Theory 4: Community B
 
* Theory 5: Community C
 
* Theory 5: Community C
 +
 +
'''Part 2. Details''': A (potentially detailed) exposition of each of the accepted theories. This can include any combination of the following:
 +
* formulation text (if <code><nowiki>formulationtext=yes</nowiki></code>)
 +
* formulation file (if <code><nowiki>formulationfile=yes</nowiki></code>)
 +
* description (if <code><nowiki>description=yes</nowiki></code>)
  
  
Line 25: Line 32:
 
* <code><nowiki>|formulationfile=</nowiki></code> - if ''yes'', then the file with the formulation diagram is added to each record.
 
* <code><nowiki>|formulationfile=</nowiki></code> - if ''yes'', then the file with the formulation diagram is added to each record.
 
* <code><nowiki>|description=</nowiki></code> - if ''yes'', then the first paragraph of the description is added to each record.
 
* <code><nowiki>|description=</nowiki></code> - if ''yes'', then the first paragraph of the description is added to each record.
* <code><nowiki>|bullets=</nowiki></code> - if ''yes'', a bullet-list will be produced.
+
* <code><nowiki>|bullets=</nowiki></code> - if ''yes'', a bullet-list will be produced in Part 1.
 
* <code><nowiki>|linebreak=</nowiki></code> - if ''yes'', each theory's entry will start from a new line; if ''no'' (default), a mere space will be added between sentences.
 
* <code><nowiki>|linebreak=</nowiki></code> - if ''yes'', each theory's entry will start from a new line; if ''no'' (default), a mere space will be added between sentences.
 
* <code><nowiki>|communitiesfirst=</nowiki></code> - if ''yes'', the communities will be mentioned first in the sentence. If ''no'' (default) the name of the theory will appear first.
 
* <code><nowiki>|communitiesfirst=</nowiki></code> - if ''yes'', the communities will be mentioned first in the sentence. If ''no'' (default) the name of the theory will appear first.
Line 31: Line 38:
  
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
-->{{#if: {{{topic|}}} |<!--
+
-->{{#if: {{{topic|}}}<!--
  --><!-- check the grouping flag
+
-->|<!--  
-->{{#ifeq: {{{groupbycommunity|no}}}|yes<!--
+
   
  -->|<!-- yes
+
  --><!-- Get the list of all accepted theories regardless of a community
  --><!-- get the communities first
+
  --><!--
  -->{{#arraydefine: varAccCommunities<!--
+
  -->{{#arraydefine: varAccTheories<!--
    -->|{{#ask:<!--
+
  -->|{{#ask:<!--
      -->[[SubObjectCategory::Topic Current Answer]]<!--
+
    -->[[SubObjectCategory::Topic Current Answer]]<!--
      -->[[Topic::{{{topic|}}}]]<!--
+
    -->[[Topic::{{{topic|}}}]]<!--
      -->|?Community<!--
+
    -->|?Theory<!--
      -->|mainlabel=-<!--
+
    -->|mainlabel=-<!--
      -->|headers=hide<!--
+
    -->|headers=hide<!--
      -->|link=none<!--
+
    -->|link=none<!--
      -->|limit=10000<!--
+
    -->|limit=10000<!--
    -->}}<!--
+
    -->}}<!--
    -->| , |unique<!--
+
  -->| , |unique<!--
  -->}}<!-- arraydefine
+
  -->}}<!-- arraydefine
  --><!--
+
  --><!--
  --><!-- remove duplicates
+
  --><!-- remove duplicates
  -->{{#arrayunique: varAccCommunities}}<!--
+
  -->{{#arrayunique: varAccTheories}}<!--
  --><!--
+
 
  -->{{#switch: {{#arraysize: varAccCommunities}}<!--
+
  --><!-- Check the grouping flag  
    -->|0={{{default|}}}<!--
+
  --><!--
    -->|{{{intro|}}}<!--
+
  -->{{#ifeq: {{{groupbycommunity|no}}}|yes<!--
    -->{{#arrayprint: varAccCommunities<!--
+
 
       -->||@@@@<!--
+
  -->|<!-- Yes: Group BY Community
      -->|{{#ifeq: {{{linebreak|}}}|yes|<nowiki/>
+
    --><!--  
 +
    -->{{#arraydefine: varAccCommunities<!--
 +
    -->|{{#ask:<!--
 +
      -->[[SubObjectCategory::Topic Current Answer]]<!--
 +
      -->[[Topic::{{{topic|}}}]]<!--
 +
      -->|?Community<!--
 +
      -->|mainlabel=-<!--
 +
      -->|headers=hide<!--
 +
      -->|link=none<!--
 +
      -->|limit=10000<!--
 +
      -->}}<!--
 +
    -->| , |unique<!--
 +
    -->}}<!-- arraydefine
 +
    --><!--
 +
    --><!-- remove duplicates
 +
    -->{{#arrayunique: varAccCommunities}}<!--
 +
    --><!--
 +
    -->{{#switch: {{#arraysize: varAccCommunities}}<!--
 +
    -->|0={{{default|}}}<!--
 +
    -->|{{{intro|}}}<!--
 +
      -->{{#arrayprint: varAccCommunities<!--
 +
      -->||varCommunity<!--
 +
      -->|{{#ifeq: {{{linebreak|}}}|yes|<nowiki/>
 +
|&#32;}}{{#ifeq: {{{bullets|}}}|yes|*<nowiki> </nowiki>|}}<!--
 +
      -->{{PrintCommunityTopicCurrentTheoriesList|community=varCommunity|topic={{{topic|}}}|communitiesfirst={{{communitiesfirst|no}}}|link=all|linktheory=yes}}&#32;<!--
 +
      -->}}<!--arrayprint
 +
      -->{{{outro|}}}<!--
 +
    -->}}<!-- switch
 +
    --><!--
 +
 
 +
 
 +
  -->|<!-- No: Group By Theory
 +
    --><!--
 +
    --><!--
 +
    -->{{#switch: {{#arraysize: varAccTheories}}<!--
 +
    -->|0={{{default|}}}<!--
 +
    -->|{{{intro|}}}<!--
 +
       -->{{#arrayprint: varAccTheories<!--
 +
      -->||@@@@<!--
 +
      -->|{{#ifeq: {{{linebreak|}}}|yes|<nowiki/>
 
|&#32;}}{{#ifeq: {{{bullets|}}}|yes|*<nowiki> </nowiki>|}}<!--
 
|&#32;}}{{#ifeq: {{{bullets|}}}|yes|*<nowiki> </nowiki>|}}<!--
      -->{{PrintCommunityTopicCurrentTheoriesList|community=@@@@|topic={{{topic|}}}|communitiesfirst={{{communitiesfirst|no}}}|link=all|linktheory=yes}}<!--  
+
        -->{{PrintTheoryCurrentlyAcceptedInCommunities|theory=@@@@|communitiesfirst={{{communitiesfirst|no}}}|link=all|linktheory=yes|}}&#32;<!--  
    -->}}<!--arrayprint  
+
      -->}}<!--arrayprint  
    -->{{{outro|}}}<!--
+
      -->{{{outro|}}}<!--
  -->}}<!-- switch
+
    -->}}<!-- switch
 
   --><!--
 
   --><!--
  --><!-- in this version only the theory formulation can be included / the diagram file cannot
+
 
  --><!-- they come separately at the end, after it has been listed which community accepts which theories
+
 
  --><!-- add formulation text if necessary
+
  -->}}<!-- ifeq grouping flag
  -->{{#ifeq: {{{formulationtext|no}}}|yes|<!--
+
 
    --><!--
+
 
    --><!-- get the list of theories
+
  --><!-- Now print the details for each theory, if necessary
    -->{{#arraydefine: varAccTheories<!--
+
  --><!--
      -->|{{#ask:<!--
+
  -->{{#arrayprint: varAccTheories||varTheory<!--
        -->[[SubObjectCategory::Topic Current Answer]]<!--
+
   -->|<!--
        -->[[Topic::{{{topic|}}}]]<!--
+
 
        -->|?Theory<!--
+
     --><!-- Add a line break and/or bullets if necessary
        -->|mainlabel=-<!--
+
     --><!--  
        -->|headers=hide<!--
+
     -->{{#ifeq: {{{linebreak|}}}|yes|<nowiki/>
        -->|link=none<!--
 
        -->|limit=10000<!--
 
      -->}}<!--
 
      -->| , |unique<!--
 
    -->}}<!-- arraydefine
 
    --><!--
 
    --><!-- remove duplicates
 
    -->{{#arrayunique: varAccTheories}}<!--
 
    --><!--
 
    -->{{#switch: {{#arraysize: varAccTheories}}<!--
 
      -->|0=<!--
 
      -->|<!--
 
      -->{{#arrayprint: varAccTheories<!--
 
        -->||@@@@<!--
 
        -->|{{#ifeq: {{{linebreak|}}}|yes|<nowiki/>
 
|&#32;}}{{#ifeq: {{{bullets|}}}|yes|*|}}<!--
 
        -->&#32;''@@@@'' states "{{#show: @@@@|?Formulation Text|link=none}}"<!--
 
      -->}}<!--arrayprint
 
    -->}}<!-- switch
 
    --><!--
 
   -->}}<!-- if formulation text
 
  --><!--
 
  -->|<!-- groupbycommunity=no
 
  --><!--  
 
  --><!-- get the theories first
 
  -->{{#arraydefine: varAccTheories<!--
 
     -->|{{#ask:<!--
 
      -->[[SubObjectCategory::Topic Current Answer]]<!--
 
      -->[[Topic::{{{topic|}}}]]<!--
 
      -->|?Theory<!--
 
      -->|mainlabel=-<!--
 
      -->|headers=hide<!--
 
      -->|link=none<!--
 
      -->|limit=10000<!--
 
    -->}}<!--
 
    -->| , |unique<!--
 
  -->}}<!-- arraydefine
 
  --><!--
 
  --><!-- remove duplicates
 
  -->{{#arrayunique: varAccTheories}}<!--
 
  --><!--
 
  -->{{#switch: {{#arraysize: varAccTheories}}<!--
 
     -->|0={{{default|}}}<!--
 
     -->|{{{intro|}}}<!--
 
    -->{{#arrayprint: varAccTheories<!--
 
      -->||@@@@<!--
 
      -->|{{#ifeq: {{{linebreak|}}}|yes|<nowiki/>
 
 
|&#32;}}{{#ifeq: {{{bullets|}}}|yes|*<nowiki> </nowiki>|}}<!--
 
|&#32;}}{{#ifeq: {{{bullets|}}}|yes|*<nowiki> </nowiki>|}}<!--
      -->{{PrintTheoryCurrentlyAcceptedInCommunities|theory=@@@@|communitiesfirst={{{communitiesfirst|no}}}|link=all|linktheory=yes|formulationtext={{{formulationtext|}}}|formulationfile={{{formulationfile|}}}|description={{{description}}}|}}<!--  
+
    --><!--
    -->}}<!--arrayprint
+
 
    -->{{{outro|}}}<!--
+
    --><!-- Add the formulation text if necessary
  -->}}<!-- switch
+
    --><!--
  --><!--
+
    -->{{#ifeq: {{{formulationtext|no}}}|yes|<!--
-->}}<!-- ifeq
+
      -->varTheory states: "{{#show: varTheory|?Formulation Text|link=none}}"&#32;<!--
 +
    -->}}<!-- if formulation text
 +
    --><!--
 +
 +
    --><!-- add the diagram if necessary
 +
    -->{{#ifeq: {{{formulationfile|no}}}|yes|<!--
 +
      --><!--
 +
      -->{{#if: {{#show: varTheory|?Formulation File|link=none}}|<nowiki/>
 +
 
 +
{{PrintDiagramFile|diagram file={{#show: varTheory|?Formulation File|link=none}}|}}
 +
<nowiki/>
 +
<!--
 +
        -->}}<!-- if diagram
 +
      -->}}<!-- if formulation file
 +
      --><!--
 +
      --><!-- add description if necessary
 +
      -->{{#ifeq: {{{description|no}}}|yes|{{#replace: {{#show: varTheory|?Description|link=none}}|CITE_|CiteRef::}} <br>
 +
|}}<!--
 +
    --><!--  
 +
    --><!--  
 +
  -->}}<!-- arrayprint
 +
 
 
--><!--
 
--><!--
 
-->}}<!-- if  
 
-->}}<!-- if  
 
--></includeonly>
 
--></includeonly>

Revision as of 22:27, 23 January 2023

This template is used to print a list of accepted theories on this topic. It displays the theories accepted on a given topic. There are several ways this can be printed depending on the parameters. The print out consists of two main parts:

Part 1. Summary: A short statement of which theories are accepted in which community. This can be done in two options depending on the value of groupbycommunity:

Option 1: (if groupbycommunity=yes)

  • Community A: Theory 1, Theory 2, Theory 3
  • Community B: Theory 2, Theory 3, Theory 4
  • Community C: Theory 1, Theory 3, Theory 5

Option 2: (if groupbycommunity=no or empty)

  • Theory 1: Community A, Community C
  • Theory 2: Community A, Community B
  • Theory 3: Community A, Community B, Community C
  • Theory 4: Community B
  • Theory 5: Community C

Part 2. Details: A (potentially detailed) exposition of each of the accepted theories. This can include any combination of the following:

  • formulation text (if formulationtext=yes)
  • formulation file (if formulationfile=yes)
  • description (if description=yes)


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

Parameters:

  • |topic= - the topic.
  • |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.
  • |formulationtext= - if yes, then the formulation of the theory is added to each record.
  • |formulationfile= - if yes, then the file with the formulation diagram is added to each record.
  • |description= - if yes, then the first paragraph of the description is added to each record.
  • |bullets= - if yes, a bullet-list will be produced in Part 1.
  • |linebreak= - if yes, each theory's entry will start from a new line; if no (default), a mere space will be added between sentences.
  • |communitiesfirst= - if yes, the communities will be mentioned first in the sentence. If no (default) the name of the theory will appear first.
  • |groupbycommunity= - if yes, the result will be grouped by community (e.g. Theories A, B, C are accepted by community X. Theories A, D, E are accepted by community Y.) If no (default) the result will be grouped by theory (e.g. Theory A is accepted in communities X and Y.).