Difference between revisions of "Template:PrintOntologicalTheoryTopicQuestions"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
(Created page with "<noinclude> This template is used to print the ontological questions that the theory attempts to answer. Since some ontological theories attempt to answer more than one questi...")
 
 
(4 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
* <code><nowiki>|outro one=</nowiki></code> - text that is appended to the output, if exactly one result exist. If not given, <code><nowiki>|outro=</nowiki></code> will be used.
 
* <code><nowiki>|outro one=</nowiki></code> - text that is appended to the output, if exactly one result exist. If not given, <code><nowiki>|outro=</nowiki></code> will be used.
 
* <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> - determines whether the values are to be printed as links to the respective pages (where available) or the forms to create the respective pages; possible values are ''none'', ''subject'', ''all''. If not given ''all'' is the default.
 
* <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>|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).
  
Line 19: Line 19:
 
   -->|mainlabel=-<!--
 
   -->|mainlabel=-<!--
 
   -->|headers=hide<!--
 
   -->|headers=hide<!--
   -->|link={{{link|}}}<!--
+
   -->|link=none<!--
 
   -->|?Topic<!--
 
   -->|?Topic<!--
 
   -->|limit=10000<!--
 
   -->|limit=10000<!--
Line 37: Line 37:
 
  -->|0=<!--
 
  -->|0=<!--
 
  -->|<!--
 
  -->|<!--
   -->{{#if: {{{pretty|}}}<!--
+
   -->{{#arrayprint: values|,&#32;|varTopic<!--
 
   -->|<!--
 
   -->|<!--
 +
    --><!-- get the Term and the Ontological Question Type
 +
    --><!-- NOTE: these cannot be obtained from the topic's own properties of Term and Ontological Question Type
 +
    --><!--  This is because the template must work even the topic page doesn't exist
 +
    -->{{#vardefine: varTerm|{{GetTermFromTopicTitle|topic=varTopic}}|}}<!--
 +
    -->{{#vardefine: varQuestionType|{{GetOntologicalQuestionTypeFromTopicTitle|topic=varTopic}}|}}<!--
 
     --><!--
 
     --><!--
     -->{{#arrayprint: values||varTopic<!--
+
     --><!-- print the question with a form link
    -->|<!--
+
    -->{{#switch: {{#var: varQuestionType}}<!--
      --><!-- get the Term and the Ontological Question Type
+
    -->|Existence={{FormatExistenceTopicTitle|term={{#var: varTerm}}|link={{{link}}}|}}<!--
      -->{{#vardefine: varTerm|{{#show: varTopic|?Term}}|}}<!--
+
    -->|Disjointness={{FormatDisjointnessTopicTitle|term={{#var: varTerm}}|link={{{link}}}|}}<!--  
      -->{{#vardefine: varQuestionType|{{#show: varTopic|?Ontological Question Type}}|}}<!--
+
    -->|Subtypes={{FormatSubtypesTopicTitle|term={{#var: varTerm}}|link={{{link}}}|}}<!--
      --><!--
+
    -->|Supertypes={{FormatSupertypesTopicTitle|term={{#var: varTerm}}|link={{{link}}}|}}<!--
      --><!-- print the question with a form link
+
    -->|Associations={{FormatAssociationsTopicTitle|term={{#var: varTerm}}|link={{{link}}}|}}<!--
      -->{{#switch: {{#var: varQuestionType}}<!--
+
     -->}}<!-- switch
      -->|Existence={{FormatExistenceTopicTitle|term={{#var: varTerm}}|link=yes}}<!--
 
      -->|Disjointness={{FormatDisjointnessTopicTitle|term={{#var: varTerm}}|link=yes}}<!--  
 
      -->|Subtypes={{FormatSubtypesTopicTitle|term={{#var: varTerm}}|link=yes}}<!--
 
      -->|Supertypes={{FormatSupertypesTopicTitle|term={{#var: varTerm}}|link=yes}}<!--
 
      -->|Associations={{AssociationsTopicTitle|term={{#var: varTerm}}|link=yes}}<!--
 
      -->}}<!-- switch
 
      --><!--
 
      -->varTopic
 
    -->|<!--print=pretty<!--
 
     -->}}<!-- array print
 
 
     --><!--
 
     --><!--
   -->|<!--
+
   -->|{{#if: {{{pretty|}}}|print=pretty|}}<!--
    -->{{#arrayprint: values|,&#32;|varTopic|varTopic}}<!--
+
  -->}}<!-- array print
    --><!--
+
   --><!--
   -->}}<!--
 
 
   --><!--
 
   --><!--
 
-->}}<!-- switch
 
-->}}<!-- switch

Latest revision as of 19:40, 27 December 2022

This template is used to print the ontological questions that the theory attempts to answer. Since some ontological theories attempt to answer more than one question (e.g. "A is a subtype of B" is an answer to two questions: "What are the subtypes of B?" and "What are the supertypes of A?"), and since some of these topic pages may yet to be created, it is important to make sure that these are not regular links but are links that check the existence of the page and, if one doesn't exist, offer a link to the correct form.

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

Parameters:

  • |theory= - the fullpagename of the 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.
  • |intro one= - initial text that precedes the output, if exactly one result exist. If not given, |intro= will be used.
  • |outro one= - text that is appended to the output, if exactly one result exist. If not given, |outro= will be used.
  • |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) or the forms to create the respective pages; possible values are none, subject, all. If not given all is the default.
  • |pretty= - if non empty, a pretty list is produced where the last two elements are chained with an and (or the local languages equivalent).