Changes

Jump to navigation Jump to search
no edit summary
<noinclude>
This template is used to print a list of accepted theories on this topic. It displays the theories accepted on a given topic by sorting them according to their topic's sorting order. To print the details of the accepted theories, use [[Template:PrintTopicAcceptedTheoriesDetails]].
There are several ways this can be printed depending on the parameters. The print out consists of two main parts:  '''Part 1. Summary''': A template prints 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>)
* Theory 5: Community C
Formulation texts are can also be printed in part one if <code><nowiki>formulationtext=oneyes</nowiki></code>.
'''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=two</nowiki></code>)
* formulation file (if <code><nowiki>formulationfile=yes</nowiki></code>)
* description (if <code><nowiki>description=yes</nowiki></code>)
'''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.
'''Parameters:'''
* <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>|formulationtext=</nowiki></code> - if ''oneyes'', then the formulation of the theory is added in part 1, if ''two'', it will be added to part 2.* <code><nowiki>|formulationfile=</nowiki></code> - if ''yes''Otherwise (default), then the file with the formulation diagram is added to each record.* <code><nowiki>|description=</nowiki></code> - if ''yes'text won', 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 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 t be added between sentencesprinted.
* <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>|groupbycommunity=</nowiki></code> - 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.).
-->}}<!-- switch
--><!--
  --><!-- Get the list of all accepted theories regardless of a community: --><!-- This is required since the details of all accepted theories will be printed in Part 2 regardless of a communityanswers
--><!--
-->{{#arraydefine: varAccTheoriesvarAnswers<!--
-->|{{#ask:<!--
-->[[SubObjectCategory::Topic Current Answer Individual]]<!--
-->[[Topic::{{{topic|}}}]]<!--
-->[[Answer Type::Complete||Inherited||Partial]]<!-- do not need the None's
-->|?Theory<!--
-->|mainlabel=-<!--
-->|headers=hide<!--
-->|sort=Answer Type, Sorting Order<!-- -->|order=asc, asc<!--
-->|link=none<!--
-->|limit=10000<!--
--><!--
--><!-- remove duplicates
-->{{#arrayunique: varAccTheoriesvarAnswers}}<!--
--><!--
--><!-- Check the grouping flag
--><!--
-->{{#arraydefine: varAccCommunities<!--
-->|{{#ask:<!--
-->[[SubObjectCategory::Topic Current Answer]]<!--
-->[[Topic::{{{topic|}}}]]<!--
-->|?Community<!--
-->{{#arrayprint: varAccCommunities||varCommunity<!--
-->|<!--
-->{{#ifeq: {{{linebreak|}}}|yes|<p>|}}<!-- -->{{#ifeq: {{{bullets|}}}|yes|*<nowiki> </nowiki>|}}<!-- -->{{PrintCommunityTopicCurrentTheoriesListPrintCommunityTopicCurrentTheories<!--
-->|community=varCommunity<!--
-->|topic={{{topic|}}}<!--
-->|default={{#var: varDefault}} [[varCommunity|{{PAGENAME: varCommunity}}]].<!--
-->|communityfirst={{{communitiesfirst|no}}}<!--
-->|formulationtext={{#ifeq: {{{formulationtext|no}}}|one|yes|no}}<!--
-->|link=yes<!--
-->|linktheory=yes<!--
-->}}<!-- -->{{#ifeq: {{{linebreak|}}}|yes|</p>|&#32;}}<!-- 
-->}}<!--arrayprint
-->{{{outro|}}}<!--
-->}}<!-- switch
--><!--
-->{{#arrayprint: varAccTheories||varTheory<!--
-->|<!--
-->{{#ifeq: {{{linebreak|}}}|yes|<p>|}}<!-- -->{{#ifeq: {{{bullets|}}}|yes|*<nowiki> </nowiki>|}}<!--
-->{{PrintTheoryCurrentlyAcceptedInCommunities<!--
-->|theory=varTheory<!--
-->|communitiesfirst={{{communitiesfirst|no}}}<!--
-->|formulationtext={{#ifeq: {{{formulationtext|}}}|one|yes|no}}<!--
-->|link=yes<!--
-->|linktheory=yes<!--
-->}}&#32;<!--
-->{{#ifeq: {{{linebreak|}}}|yes|</p>|&#32;}}<!--
-->}}<!--arrayprint
 
-->{{{outro|}}}<!--
-->}}<!-- switch
-->}}<!-- ifeq grouping flag
 
--><!-- Now print the details for each theory, if necessary
--><!--
-->{{#arrayprint: varAccTheories||varTheory<!--
-->|<!--
 
--><!-- Add the bullets if necessary
--><!--
-->{{#ifeq: {{{linebreak|}}}|yes|<p>|}}<!--
-->{{#ifeq: {{{bullets|}}}|yes|*<nowiki> </nowiki>|}}<!--
--><!--
 
--><!-- Add the formulation text if necessary
--><!--
-->{{#ifeq: {{{formulationtext|}}}|two|<!--
-->[[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/>
&#32;<!--
-->}}<!-- if diagram
-->}}<!-- if formulation file
--><!--
--><!-- add description if necessary
-->{{#ifeq: {{{description|no}}}|yes|{{#replace: {{#show: varTheory|?Description|link=none}}|CITE_|CiteRef::}}|}}<!--
--><!--
 
--><!-- Add the line break if necessary
--><!--
-->{{#ifeq: {{{linebreak|}}}|yes|</p>|&#32;}}<!--
--><!--
-->}}<!-- arrayprint
 
--><!--
-->}}<!-- if
--></includeonly>

Navigation menu