Difference between revisions of "Template:PrintTopicAcceptedTheoriesList"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
− | This template is used to print | + | 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 | + | * <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 |
− | + | -->{{#arraydefine: varAccTheories<!-- | |
− | + | -->|{{#ask:<!-- | |
− | + | -->[[SubObjectCategory::Acceptance Record]]<!-- | |
− | + | -->[[Topic::{{{topic|}}}]]<!-- | |
− | + | -->[[Still Accepted::true]]<!-- | |
− | + | -->|?Theory<!-- | |
− | + | -->|link=none<!-- | |
− | -->| | + | -->|limit=10000<!-- |
− | + | -->}}<!-- | |
− | + | -->| , |unique<!-- | |
− | + | -->}}<!-- arraydefine | |
− | -->| | + | --><!-- |
− | -->| | + | --><!-- remove duplicates |
− | + | -->{{#arrayunique: varAccTheories}}<!-- | |
− | + | --><!-- | |
− | + | -->{{#switch: {{#arraysize: varAccTheories}}<!-- | |
− | + | -->|0={{{default|}}}<!-- | |
− | + | -->|{{{intro|}}}<!-- | |
− | + | -->{{#arrayprint: varAccTheories<!-- | |
− | -->}}<!-- | + | -->||@@@@<!-- |
− | -->}}<!-- | + | -->|<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.