Difference between revisions of "Template:PrintTermInheritedQuestionsHeaders"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:
 
* <code><nowiki>|subfield=</nowiki></code> - {Ontology, Dynamics, etc.}. Default is dynamics.
 
* <code><nowiki>|subfield=</nowiki></code> - {Ontology, Dynamics, etc.}. Default is dynamics.
 
* <code><nowiki>|link=</nowiki></code> - if not empty, a link to the respective page or a formlink (if the page doesn't exist) will be added.
 
* <code><nowiki>|link=</nowiki></code> - if not empty, a link to the respective page or a formlink (if the page doesn't exist) will be added.
 +
* <code><nowiki>|bullets=</nowiki></code> - if ''yes'', a bullet-list of answers will be produced. Otherwise, 
 +
* <code><nowiki>|linebreak=</nowiki></code> - if ''yes'', each community will start from a new line; if ''no'' (default), a mere space will be added between sentences.
  
 
'''unused for now:'''  
 
'''unused for now:'''  
* <code><nowiki>|bullets=</nowiki></code> - if ''yes'', a bullet-list of answers will be produced. Otherwise, 
 
* <code><nowiki>|linebreak=</nowiki></code> - if ''yes'', each community will start from a new line; if ''no'' (default), a mere space will be added between sentences.
 
 
* <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.
  
Line 53: Line 53:
 
     -->}}<!--vardefine
 
     -->}}<!--vardefine
 
     --><!--
 
     --><!--
     --><!-- TODO: add the headers
+
     --><nowiki/>
     -->{{#var: varPage}}<!--
+
===<!--
 +
    --><!--
 +
    --><!-- check if the page exists
 +
    -->{{#ifexist:{{#var: varPage}}<!--
 +
    -->|{{#if: {{{link|}}}|[[{{#var: varPage}}]]|{{#var: varPage}}|}}<!-- link to the page
 +
    -->|<!-- doesn't exist, check if the formlink is expected
 +
      -->{{#if: {{{link|}}}<!--
 +
      -->|<!-- return the formlink
 +
        -->{{#formlink:form=Topic|link text={{#var: varPage}}|target={{#var: varPage}}|query string=Topic[Subject]={{{term|}}}&Topic[Inherited From]=varQuestion|}}<!--
 +
      -->|<!-- form link is not needed; return the name only
 +
        -->{{#var: varPage}}<!--
 +
      -->}}<!-- if 
 +
    -->}}<!-- if exists
 +
    --><!--
 +
-->===
 +
<nowiki/>
 +
<!--
 +
 
 +
     --><!-- print the current answers
 +
    --><!--
 +
    -->{{PrintTopicAcceptedTheoriesFormulations<!--
 +
    -->|topic={{#var: varPage}}<!--  
 +
    -->|default=The question has no accepted answer.&#32;<!--   
 +
    -->|bullets={{{bullets|}}}<!--   
 +
    -->|linebreak={{{linebreak|}}}<!--   
 +
    -->|link=yes<!--   
 +
    -->}}<!-- print
 
     --><!--
 
     --><!--
 +
 
   -->}}<!--arrayprint  
 
   -->}}<!--arrayprint  
 
   --><!--
 
   --><!--
  --><!--
+
 
 
   --><!--
 
   --><!--
 
-->}}<!-- if  
 
-->}}<!-- if  
 
--></includeonly>
 
--></includeonly>

Latest revision as of 17:05, 26 January 2023

This template is used to print a list of question that a term can potentially inherit. The template searches for the heritable questions of the term's ancestors and decodes the formula of the question's title. If a page like that already exists, it provides a link to that page. If a page doesn't exist, it prints a redlink to the respective form with prefilled parameters for the easy creation of the page.

The template is a work in progress.

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

Parameters:

  • |term= - the term.
  • |subfield= - {Ontology, Dynamics, etc.}. Default is dynamics.
  • |link= - if not empty, a link to the respective page or a formlink (if the page doesn't exist) will be added.
  • |bullets= - if yes, a bullet-list of answers will be produced. Otherwise,
  • |linebreak= - if yes, each community will start from a new line; if no (default), a mere space will be added between sentences.

unused for now:

  • |communitiesfirst= - if yes, the communities will be mentioned first in the sentence. If no (default) the name of the theory will appear first.