Difference between revisions of "Template:PrintTermInheritedQuestionsHeaders"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
 
(3 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 22: Line 22:
 
   -->{{#arraydefine: varHeritableQuestions<!--
 
   -->{{#arraydefine: varHeritableQuestions<!--
 
   -->|{{#ask:<!--
 
   -->|{{#ask:<!--
     -->[[Category::Topic]]<!--
+
     -->[[Category:Topic]]<!--
 
     -->[[Subfield::{{{subfield|Dynamics}}}]]<!--
 
     -->[[Subfield::{{{subfield|Dynamics}}}]]<!--
 
     -->[[Subject::<q>[[-Ancestor items::{{{term|}}}]]</q>]]<!--  
 
     -->[[Subject::<q>[[-Ancestor items::{{{term|}}}]]</q>]]<!--  
Line 38: Line 38:
 
   -->{{#arrayprint: varHeritableQuestions||varQuestion<!--
 
   -->{{#arrayprint: varHeritableQuestions||varQuestion<!--
 
   -->|<!--
 
   -->|<!--
 +
    --><!-- get the variables to decode the title
 +
    -->{{#vardefine: varFormula|{{#show: varQuestion|?Question Title Formula|link=none}}}}<!--
 +
    -->{{#vardefine: varPredicate|{{#show: varQuestion|?Predicate|link=none}}}}<!--
 +
    -->{{#vardefine: varObject|{{#show: varQuestion|?Object Class|link=none}}}}<!--
 +
    --><!--
 
     -->{{#vardefine: varPage<!--
 
     -->{{#vardefine: varPage<!--
 
     -->|<!--
 
     -->|<!--
 
       -->{{DecodeTitleFormula<!--
 
       -->{{DecodeTitleFormula<!--
       -->|formula={{#show: varQuestion|?Question Title Formula|link=none}}<!--
+
       -->|formula={{#var: varFormula}}<!--
 
       -->|subject={{{term|}}}<!--
 
       -->|subject={{{term|}}}<!--
       -->|predicate={{#show: varQuestion|?Predicate|link=none}}<!--
+
       -->|predicate={{#var: varPredicate}}<!--
       -->|object={{#show: varQuestion|?Object Class|link=none}}<!--
+
       -->|object={{#var: varObject}}<!--
 
       -->}}<!--
 
       -->}}<!--
 
     -->}}<!--vardefine
 
     -->}}<!--vardefine
 
     --><!--
 
     --><!--
     --><!-- TODO: add the headers
+
     --><nowiki/>
 +
===<!--
 
     --><!--
 
     --><!--
 
     --><!-- check if the page exists
 
     --><!-- check if the page exists
Line 62: Line 68:
 
     -->}}<!-- if exists
 
     -->}}<!-- 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.