Difference between revisions of "Template:FormatSupertypesTopicTitle"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
(Created page with "<noinclude> Use this template to format the title of the topic page for the question concerning the supertypes of a class. '''NOTE:''' As any "printing" template, it doesn't...")
 
 
(3 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
 
'''Parameters:'''
 
'''Parameters:'''
* <code><nowiki>|term=</nowiki></code> - a comma delimited list of authors.
+
* <code><nowiki>|term=</nowiki></code> - the term.
 +
* <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>|displaytitle=</nowiki></code> - if empty, the same as the output.
 
   
 
   
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
 
-->{{#if: {{{term|}}}<!--
 
-->{{#if: {{{term|}}}<!--
  -->|Supertypes of {{{term|}}}<!--
+
  -->|<!--
 +
  -->{{#vardefine: varTitle|Supertypes of {{{term|}}}|}}<!--
 +
  -->{{#vardefine: varDisplay|{{#if: {{{displaytitle|}}}|{{{displaytitle|}}}|{{#var: varTitle}}|}}|}}<!--
 +
  --><!--
 +
  -->{{#ifexist:{{#var: varTitle}}<!--
 +
  -->|{{#if: {{{link|}}}|[[{{#var: varTitle}}|{{#var: varDisplay}}]]|{{#var: varTitle}}|}}<!--
 +
  -->|<!-- doesn't exist, check if the formlink is expected
 +
    -->{{#if: {{{link|}}}<!--
 +
    -->|<!-- return the formlink
 +
      -->{{#formlink:form=Ontological Topic|link text={{#var: varDisplay}}|target={{#var: varTitle}}|query string=Term={{{term|}}}&QuestionType=Supertypes}}<!--
 +
    -->|<!-- form link is not needed; return the name only
 +
      -->{{#var: varTitle}}<!--
 +
    -->}}<!-- if 
 +
  -->}}<!-- if exists
 +
  --><!--  
 
  -->|<!-- the term is missing, nothing to return
 
  -->|<!-- the term is missing, nothing to return
 
-->}}<!-- if  
 
-->}}<!-- if  
 
--></includeonly>
 
--></includeonly>

Latest revision as of 16:15, 27 December 2022

Use this template to format the title of the topic page for the question concerning the supertypes of a class.

NOTE: As any "printing" template, it doesn't store any values anywhere, but merely returns a value.

Parameters:

  • |term= - the term.
  • |link= - if not empty, a link to the respective page or a formlink (if the page doesn't exist) will be added.
  • |displaytitle= - if empty, the same as the output.