Difference between revisions of "Template:FormatExistenceTopicTitle"

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 existence of a class. '''NOTE:''' As any "printing" template, it doesn't...")
 
Line 6: Line 6:
 
'''Parameters:'''
 
'''Parameters:'''
 
* <code><nowiki>|term=</nowiki></code> - the term.
 
* <code><nowiki>|term=</nowiki></code> - the term.
 +
* <code><nowiki>|formlink=</nowiki></code> - if not empty, a formlink will be added if the page does not exist.
 +
* <code><nowiki>|displaytitle=</nowiki></code> - if empty, the same as the output.
 
   
 
   
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
 
-->{{#if: {{{term|}}}<!--
 
-->{{#if: {{{term|}}}<!--
  -->|Existence of {{{term|}}}<!--
+
  -->|<!--
 +
  -->{{#var: varTitle|Existence of {{{term|}}}|}}<!--
 +
  -->{{#var: varDisplay|{{#if: {{{displaytitle|}}}|{{{displaytitle|}}}|{{#var: varTitle}}|}}|}}<!--
 +
  --><!--
 +
  -->{{#ifexist:{{#var: varTitle}}<!--
 +
  -->|[[{{#var: varTitle}}|]]<!--
 +
  -->|<!-- doesn't exist, check if the formlink is expected
 +
    -->{{#if: {{{formlink|}}}<!--
 +
    -->|<!-- return the formlink
 +
      -->{{#formlink:form=Ontological Topic|link text={{#var: varDisplayTitle}}|target={{#var: varTitle}}|query string=Term={{{term|}}}&QuestionType=Existence}}<!--
 +
    -->|<!-- form link is not needed; nothing to return
 +
    -->}}<!-- if 
 +
  -->}}<!-- if exists
 +
  --><!--  
 
  -->|<!-- the term is missing, nothing to return
 
  -->|<!-- the term is missing, nothing to return
 
-->}}<!-- if  
 
-->}}<!-- if  
 
--></includeonly>
 
--></includeonly>

Revision as of 23:03, 26 December 2022

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

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

Parameters:

  • |term= - the term.
  • |formlink= - if not empty, a formlink will be added if the page does not exist.
  • |displaytitle= - if empty, the same as the output.