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 looks for displays the theories accepted theories on a given topic by sorting them according to their topic's sorting order. To print the details of the topic and then indicates accepted theories, use [[Template:PrintTopicAcceptedTheoriesDetails]]. The template prints a short statement of which communities it is currently theories are accepted byin 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 B: Theory 2, Theory 3, Theory 4* Community C: Theory 1, Theory 3, Theory 5 ''Option 2'': (if <code><nowiki>groupbycommunity=no</nowiki></code> 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 Formulation texts can also be printed if <code><nowiki>formulationtext=yes</nowiki></code>
'''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 ''yes'', then the formulation of the theory is added to each record.* <code><nowiki>|formulationfile=</nowiki></code> - if ''yes'', then the file with the formulaiton diagram is added to each record.* <code><nowiki>|bullets=</nowiki></code> - if ''yes'', a bullet-list will be producedadded.* <code><nowiki>|linebreak=</nowiki></code> - if ''yes'', each theory's entry will start from a new line; if ''no'' Otherwise (default), a mere space will the formulation text won'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.).
</noinclude><includeonly><!--
-->{{#if: {{{topic|}}} <!-- -->|<!-- --><!-- check Get the default text --><!-- -->{{#switch: {{#show: {{{topic|}}}|?Topic Type|link=none}}<!-- -->|<!-- -->Definitional={{#vardefine: varDefault|At the moment, the term has no accepted definition in}}<!-- -->|<!-- -->{{#vardefine: varDefault|At the moment, the question has no accepted answer in}}<!-- -->}}<!-- switch --><!--   --><!-- Get the list of all answers --><!-- -->{{#arraydefine: varAnswers<!-- -->|{{#ask:<!-- -->[[SubObjectCategory::Current Answer]]<!-- -->[[Topic::{{{topic|}}}]]<!-- -->[[Answer Type::Complete||Inherited||Partial]]<!-- -->|?Theory<!-- -->|mainlabel=-<!-- -->|headers=hide<!-- -->|sort=Answer Type, Sorting Order<!-- -->|order=asc, asc<!-- -->|link=none<!-- -->|limit=10000<!-- -->}}<!-- -->| , |unique<!-- -->}}<!-- arraydefine --><!-- --><!-- remove duplicates -->{{#arrayunique: varAnswers}}<!--  --><!-- --><!-- Check the grouping flag --><!-- -->{{#ifeq: {{{groupbycommunity|no}}}|yes<!-- -->|<!-- yesYes: Group BY Community --><!-- get the communities first -->{{#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<!-- -->|<!-- -->{{PrintCommunityTopicCurrentTheories<!-- -->|@@@@community=varCommunity<!-- -->|topic={{#ifeq: {{{linebreaktopic|}}}|yes|<nowiki/!-- -->|&#32;}}default={{#ifeqvar: {{{bullets|}varDefault}}[[varCommunity|yes|*<nowiki> </nowiki>|{{PAGENAME: varCommunity}}]].<!-- -->{{PrintCommunityTopicCurrentTheoriesList|community=@@@@|topiccommunityfirst={{{topiccommunitiesfirst|no}}}<!-- -->|communitiesfirstformulationtext={{{communitiesfirstformulationtext|no}}}<!-- -->|link=allyes<!-- -->|linktheory=yes<!-- -->}}&#32;<!-- -->}}<!--arrayprint
-->{{{outro|}}}<!--
-->}}<!-- switch --><!--   -->|<!-- No: Group By Theory --><!-- --><!-- -->{{#switch: {{#arraysize: varAccTheories}}<!-- -->|0={{{default|}}}<!-- -->|{{{intro|}}}<!-- -->{{#arrayprint: varAccTheories||varTheory<!-- -->|<!--  -->{{PrintTheoryCurrentlyAcceptedInCommunities<!-- -->|theory=varTheory<!-- -->|communitiesfirst={{{communitiesfirst|no}}}<!-- -->|link=yes<!-- -->|linktheory=yes<!-- -->}}&#32;<!--   -->}}<!--arrayprint   -->{{{outro|}}}<!-- -->}}<!-- 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: {{{formulationtext|no}}}|yes|<!-- --><!-- --><!-- get the list of theories -->{{#arraydefine: varAccTheories<!-- -->|{{#ask:<!-- -->[[SubObjectCategory::Acceptance Record]]<!-- -->[[Topic::{{{topic|}}}]]<!-- -->[[Still Accepted::true]]<!-- -->|?Theory<!-- -->|mainlabel=-<!-- -->|headers=hide<!-- -->|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 --><!-- -->|<!-- 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>|}}<!-- -->{{PrintTheoryCurrentlyAcceptedInCommunities|theory=@@@@|communitiesfirst={{{communitiesfirst|no}}}|link=all|linktheory=yes|formulationtext={{{formulationtext|}}}|formulationfile={{{formulationfile|}}}|}}<!-- -->}}<!--arrayprint -->{{{outro|}}}<!-- -->}}<!-- switch --><!-- -->}}<!-- ifeqgrouping flag--><!--
-->}}<!-- if
--></includeonly>

Navigation menu