Difference between revisions of "Template:PrintTheoryCurrentlyAcceptedInCommunities"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
 
(24 intermediate revisions by the same user not shown)
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>|link=</nowiki></code> - 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.
+
* <code><nowiki>|link=</nowiki></code> - if ''all'', then the links to pages will be printed; otherwise (default) no links will be added.
* <code><nowiki>|pretty=</nowiki></code> - if non empty, a ''pretty'' list is produced where the last two elements are chained with an ''and'' (or the local languages equivalent).
+
* <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>|skiptheorytitle=</nowiki></code> - if ''yes'' the theory's title will be replaced by "It ", if ''no'' (default) the full pagename of the theory will be used. The ''yes'' option is useful when calling this template from a theory page to avoid mentioning the theory's title several times in a row. NOTE: This parameter is ignored if <code><nowiki>communitiesfirst=yes</nowiki></code>.
 +
 
  
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
-->{{#arraydefine: values<!--
+
-->{{#if: {{{theory|}}}<!--
-->|{{#ask:<!--
+
-->|<!--
  -->[[SubObjectCategory::Acceptance Record]]<!--  
+
 
  -->[[Theory::{{{theory|}}}]]<!--  
+
  -->{{#arraydefine: varCommunities<!--
  -->[[Still Accepted::true]]<!--  
+
  -->|{{#ask:<!--
  -->|?Community<!--
+
    -->[[SubObjectCategory::Current Answer]]<!--  
  -->|mainlabel=-<!--
+
    -->[[Theory::{{{theory|}}}]]<!--  
  -->|headers=hide<!--
+
    -->[[Answer Type::Complete||Inherited||Partial]]<!--  
  -->|link={{link|}}<!--
+
    -->|?Community<!--
  -->|limit=10000<!--
+
    -->|mainlabel=-<!--
 +
    -->|headers=hide<!--
 +
    -->|link={{#ifeq:{{{link|no}}}|yes|all|none}}<!--
 +
    -->|limit=10000<!--
 +
    -->}}<!--
 +
  -->| , |unique<!--
 
   -->}}<!--
 
   -->}}<!--
-->| , |unique<!--
+
  --><!--
-->}}<!--
+
  -->{{#vardefine: varAcceptedText|{{#ifeq: {{#show: {{{theory|}}}|?Theory Type|link=none}}|Definition|definition of the term|answer to the question}}|}}<!--
-->{{#switch: {{#arraysize: values}}<!--
+
  --><!--
-->|0={{{default|}}}<!--  
+
  -->{{#vardefine: varTextPrefix|{{#ifeq: {{#show: {{{theory|}}}|?Theory Type|link=none}}|Definition|It is defined as:|It states:}}|}}<!--
-->|1={{{intro|}}}<!--
+
  --><!--
  -->{{{theory|}}} is currently accepted by {{#arrayprint: values||@@@@|@@@@|print=pretty}} community.<!--
+
  -->{{#switch: {{#arraysize: varCommunities}}<!--
  -->{{{outro|}}}<!--
+
 
-->|{{{intro|}}}<!--
+
  -->|0=<!--
  -->{{{theory|}}} is currently accepted by the following communities:&#32;<!--
+
    --><!-- No values: print the default
  -->{{#if: {{{pretty|}}}<!--
+
    --><!--
  -->|{{#arrayprint: values||@@@@|@@@@|print=pretty}}<!--
+
    -->{{{default|}}}<!--  
  -->|{{#arrayprint: values|,&#32;|@@@@|@@@@}}<!--
+
 
  -->}}.<!--
+
  -->|1=<!--
  -->{{{outro|}}}<!--
+
    --><!-- One value
-->}}<!--
+
    --><!--
 +
 
 +
    -->{{{intro|}}}<!--
 +
 
 +
    -->{{#ifeq: {{{communitiesfirst|}}}|yes<!--
 +
    -->|In {{#arrayprint: varCommunities||@@@@|@@@@|print=pretty}} community, the accepted {{#var:varAcceptedText}} is {{#ifeq: {{{linktheory|}}}|yes|[[{{{theory|}}}]]|{{{theory|}}}|}}.&#32;<!--
 +
    -->|{{#ifeq: {{{skiptheorytitle|no}}}|yes|It|{{#ifeq: {{{linktheory|}}}|yes|[[{{{theory|}}}]]|{{{theory|}}}|}}|}} is currently accepted by {{#arrayprint: varCommunities||@@@@|@@@@|print=pretty}} community as the best available {{#var:varAcceptedText}}.&#32;<!--
 +
    -->}}<!--
 +
    --><!--
 +
 
 +
    -->{{{outro|}}}<!--
 +
 
 +
  -->|<!--
 +
    --><!-- Multiple values
 +
    --><!--
 +
 
 +
    -->{{{intro|}}}<!--
 +
 
 +
    -->{{#ifeq: {{{communitiesfirst|}}}|yes<!--
 +
    -->|In {{#arrayprint: varCommunities||@@@@|@@@@|print=pretty}} communities, the accepted {{#var:varAcceptedText}} is {{#ifeq: {{{linktheory|}}}|yes|[[{{{theory|}}}]]|{{{theory|}}}|}}.&#32;<!--
 +
    -->|{{#ifeq: {{{skiptheorytitle|no}}}|yes|It|{{#ifeq: {{{linktheory|}}}|yes|[[{{{theory|}}}]]|{{{theory|}}}|}}|}} is currently accepted by {{#arrayprint: varCommunities||@@@@|@@@@|print=pretty}} communities as the best available {{#var:varAcceptedText}}.&#32;<!--
 +
    -->}}<!--
 +
    --><!--
 +
 
 +
    -->{{{outro|}}}<!--
 +
 
 +
  -->}}<!-- switch
 +
 
 +
-->}}<!-- if
 
--></includeonly>
 
--></includeonly>

Latest revision as of 22:27, 26 February 2023

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= - if all, then the links to pages will be printed; otherwise (default) no links will be added.
  • |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.
  • |skiptheorytitle= - if yes the theory's title will be replaced by "It ", if no (default) the full pagename of the theory will be used. The yes option is useful when calling this template from a theory page to avoid mentioning the theory's title several times in a row. NOTE: This parameter is ignored if communitiesfirst=yes.