Difference between revisions of "Template:PrintTopicAcceptedTheoriesList Temp"
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 displays the theories accepted on a given topic by sorting them according to their topic's sorting order. | + | 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]]. |
− | + | The 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>) | ''Option 1'': (if <code><nowiki>groupbycommunity=yes</nowiki></code>) | ||
Line 22: | Line 16: | ||
* Theory 5: Community C | * Theory 5: Community C | ||
− | Formulation texts | + | Formulation texts can also be printed if <code><nowiki>formulationtext=yes</nowiki></code>. |
− | |||
− | |||
− | |||
− | |||
− | |||
Line 38: | Line 27: | ||
* <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>|formulationtext=</nowiki></code> - if '' | + | * <code><nowiki>|formulationtext=</nowiki></code> - if ''yes'', the formulation of the theory will be added. Otherwise (default), the formulation text won't be printed. |
− | |||
− | |||
− | |||
− | |||
* <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. | ||
* <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.). | * <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.). | ||
Line 59: | Line 44: | ||
-->}}<!-- switch | -->}}<!-- switch | ||
--><!-- | --><!-- | ||
− | --><!-- Get the list of all | + | |
− | + | --><!-- Get the list of all answers | |
--><!-- | --><!-- | ||
− | -->{{#arraydefine: | + | -->{{#arraydefine: varAnswers<!-- |
-->|{{#ask:<!-- | -->|{{#ask:<!-- | ||
− | -->[[SubObjectCategory:: | + | -->[[SubObjectCategory::Current Answer]]<!-- |
-->[[Topic::{{{topic|}}}]]<!-- | -->[[Topic::{{{topic|}}}]]<!-- | ||
− | -->[[Answer Type::Complete||Inherited||Partial]]<!-- | + | -->[[Answer Type::Complete||Inherited||Partial]]<!-- |
-->|?Theory<!-- | -->|?Theory<!-- | ||
-->|mainlabel=-<!-- | -->|mainlabel=-<!-- | ||
-->|headers=hide<!-- | -->|headers=hide<!-- | ||
− | -->|sort=Sorting Order<!-- | + | -->|sort=Answer Type, Sorting Order<!-- |
− | -->|order=asc<!-- | + | -->|order=asc, asc<!-- |
-->|link=none<!-- | -->|link=none<!-- | ||
-->|limit=10000<!-- | -->|limit=10000<!-- | ||
Line 79: | Line 64: | ||
--><!-- | --><!-- | ||
--><!-- remove duplicates | --><!-- remove duplicates | ||
− | -->{{#arrayunique: | + | -->{{#arrayunique: varAnswers}}<!-- |
− | |||
− | |||
− | |||
− | |||
--><!-- | --><!-- | ||
Line 94: | Line 75: | ||
-->{{#arraydefine: varAccCommunities<!-- | -->{{#arraydefine: varAccCommunities<!-- | ||
-->|{{#ask:<!-- | -->|{{#ask:<!-- | ||
− | -->[[SubObjectCategory:: | + | -->[[SubObjectCategory::Current Answer]]<!-- |
-->[[Topic::{{{topic|}}}]]<!-- | -->[[Topic::{{{topic|}}}]]<!-- | ||
-->|?Community<!-- | -->|?Community<!-- | ||
Line 115: | Line 96: | ||
-->{{#ifeq: {{{linebreak|}}}|yes|<p>|}}<!-- | -->{{#ifeq: {{{linebreak|}}}|yes|<p>|}}<!-- | ||
-->{{#ifeq: {{{bullets|}}}|yes|*<nowiki> </nowiki>|}}<!-- | -->{{#ifeq: {{{bullets|}}}|yes|*<nowiki> </nowiki>|}}<!-- | ||
− | -->{{ | + | -->{{PrintCommunityTopicCurrentTheories<!-- |
-->|community=varCommunity<!-- | -->|community=varCommunity<!-- | ||
-->|topic={{{topic|}}}<!-- | -->|topic={{{topic|}}}<!-- | ||
-->|default={{#var: varDefault}} [[varCommunity|{{PAGENAME: varCommunity}}]].<!-- | -->|default={{#var: varDefault}} [[varCommunity|{{PAGENAME: varCommunity}}]].<!-- | ||
-->|communityfirst={{{communitiesfirst|no}}}<!-- | -->|communityfirst={{{communitiesfirst|no}}}<!-- | ||
− | -->|formulationtext= | + | -->|formulationtext={{{formulationtext|no}}}<!-- |
-->|link=yes<!-- | -->|link=yes<!-- | ||
-->|linktheory=yes<!-- | -->|linktheory=yes<!-- | ||
Line 144: | Line 125: | ||
-->|theory=varTheory<!-- | -->|theory=varTheory<!-- | ||
-->|communitiesfirst={{{communitiesfirst|no}}}<!-- | -->|communitiesfirst={{{communitiesfirst|no}}}<!-- | ||
− | -->|formulationtext= | + | -->|formulationtext={{{formulationtext|no}}}<!-- |
-->|link=yes<!-- | -->|link=yes<!-- | ||
-->|linktheory=yes<!-- | -->|linktheory=yes<!-- | ||
Line 157: | Line 138: | ||
-->}}<!-- ifeq grouping flag | -->}}<!-- ifeq grouping flag | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
-->}}<!-- if | -->}}<!-- if | ||
--></includeonly> | --></includeonly> |
Revision as of 22:05, 26 February 2023
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.
The 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 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
Formulation texts can also be printed if formulationtext=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, the formulation of the theory will be added. Otherwise (default), the formulation text won't be printed.|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.).