Difference between revisions of "Template:PrintTheoryCurrentlyAcceptedInCommunities"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
Line 12: Line 12:
 
* <code><nowiki>|linktheory=</nowiki></code> - if ''yes'' the theory name will also be a link to the theory's page, if ''no'' (default) it will be a plain text. The ''yes'' option is useful when calling this template from a non-theory page to get a link to the theory page.  
 
* <code><nowiki>|linktheory=</nowiki></code> - if ''yes'' the theory name will also be a link to the theory's page, if ''no'' (default) it will be a plain text. The ''yes'' option is useful when calling this template from a non-theory page to get a link to the theory page.  
 
* <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>|details=</nowiki></code> - if ''yes'', then details of the theory such as its formulation and diagram are added to each record.
  
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
Line 29: Line 30:
 
--><!--
 
--><!--
 
-->{{#vardefine: varAcceptedText|{{#ifeq: {{#show: {{{theory|}}}|?Theory Type|link=none}}|Definition|definition of the term|theory on the subject}}|}}<!--
 
-->{{#vardefine: varAcceptedText|{{#ifeq: {{#show: {{{theory|}}}|?Theory Type|link=none}}|Definition|definition of the term|theory on the subject}}|}}<!--
 +
--><!--
 +
-->{{#vardefine: varTextPrefix|{{#ifeq: {{#show: {{{theory|}}}|?Theory Type|link=none}}|Definition|It is defined as:|It states:}}|}}<!--
 
--><!--
 
--><!--
 
-->{{#switch: {{#arraysize: values}}<!--
 
-->{{#switch: {{#arraysize: values}}<!--
Line 37: Line 40:
 
   -->|{{#ifeq: {{{linktheory|}}}|yes|[[{{{theory|}}}]]|{{{theory|}}}|}} is currently accepted by {{#arrayprint: values||@@@@|@@@@|print=pretty}} community as the best available {{#var:varAcceptedText}}.<!--
 
   -->|{{#ifeq: {{{linktheory|}}}|yes|[[{{{theory|}}}]]|{{{theory|}}}|}} is currently accepted by {{#arrayprint: values||@@@@|@@@@|print=pretty}} community as the best available {{#var:varAcceptedText}}.<!--
 
   -->}}<!--
 
   -->}}<!--
 +
  --><!--
 +
  --><!-- add details if necessary
 +
  -->{{#ifeq: {{{details|no}}}|yes|<!--
 +
    --><nowiki/> {{#var:varTextPrefix}} "{{#show: {{{theory|}}}|?Formulation Text|link=none}}"<!--
 +
    --><!--
 +
    --><!-- add image if exists  Formulation File
 +
    -->{{#if: {{#show: {{{theory|}}}|?Formulation File|link=none}}|<nowiki/>
 +
 +
{{PrintDiagramFile|diagram file={{#show: {{{theory|}}}|?Formulation File|link=none}}|}}
 +
<nowiki/>
 +
<!--
 +
    -->}}<!-- if diagram
 +
  -->}}<!-- if details
 +
  --><!--
 
   -->{{{outro|}}}<!--
 
   -->{{{outro|}}}<!--
 
  -->|{{{intro|}}}<!--
 
  -->|{{{intro|}}}<!--
Line 43: Line 60:
 
   -->|{{#ifeq: {{{linktheory|}}}|yes|[[{{{theory|}}}]]|{{{theory|}}}|}} is currently accepted by {{#arrayprint: values||@@@@|@@@@|print=pretty}} communities as the best available {{#var:varAcceptedText}}.<!--
 
   -->|{{#ifeq: {{{linktheory|}}}|yes|[[{{{theory|}}}]]|{{{theory|}}}|}} is currently accepted by {{#arrayprint: values||@@@@|@@@@|print=pretty}} communities as the best available {{#var:varAcceptedText}}.<!--
 
   -->}}<!--
 
   -->}}<!--
 +
  --><!--
 +
  --><!-- add details if necessary
 +
  -->{{#ifeq: {{{details|no}}}|yes|<!--
 +
    --><nowiki/> {{#var:varTextPrefix}} "{{#show: {{{theory|}}}|?Formulation Text|link=none}}"<!--
 +
    --><!--
 +
    --><!-- add image if exists  Formulation File
 +
    -->{{#if: {{#show: {{{theory|}}}|?Formulation File|link=none}}|<nowiki/>
 +
 +
{{PrintDiagramFile|diagram file={{#show: {{{theory|}}}|?Formulation File|link=none}}|}}
 +
<nowiki/>
 +
<!--
 +
    -->}}<!-- if diagram
 +
  -->}}<!-- if details
 +
  --><!--
 
   -->{{{outro|}}}<!--
 
   -->{{{outro|}}}<!--
 
-->}}<!-- switch
 
-->}}<!-- switch
 
--></includeonly>
 
--></includeonly>

Revision as of 17:57, 4 December 2016

This template is used to print the list of communities where the theory is currently accepted.

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

Parameters:

  • |theory= - 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.
  • |link= - determines whether the values are to be printed as links to the respective pages (where available); possible values are none, subject, all. If not given all is the default.
  • |linktheory= - if yes the theory name will also be a link to the theory's page, if no (default) it will be a plain text. The yes option is useful when calling this template from a non-theory page to get a link to the theory page.
  • |communitiesfirst= - if yes, the communities will be mentioned first in the sentence. If no (default) the name of the theory will appear first.
  • |details= - if yes, then details of the theory such as its formulation and diagram are added to each record.