Difference between revisions of "Template:PrintTermAnASingularLowercase"

From Encyclopedia of Scientonomy
Jump to navigation Jump to search
(Created page with "<noinclude> This template is used to print a singular lowercase from of the term preceded by the respective article. If the respective page doesn't exist, the basic <code><now...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This template is used to print a singular lowercase from of the term preceded by the respective article. If the respective page doesn't exist, the basic <code><nowiki>{{AnAWord| {{lc: </nowiki>''string''<nowiki>}} }}</nowiki></code> is used.
+
This template is used to print a singular lowercase form of each term in the string preceded by the respective article. If the respective page doesn't exist, the basic <code><nowiki>{{AnAWord| {{lc: </nowiki>''term''<nowiki>}} }}</nowiki></code> is used for each term in the string.
  
 
'''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.
 
'''NOTE:''' As any "printing" template, it doesn't store any values anywhere, but merely prints them on the page.
  
 
'''Parameters:'''
 
'''Parameters:'''
* <code>''string''</code> - the term.
+
* <code>''string''</code> - the term or terms (comma separated).
 +
* <code>''link''</code> - if given, links will be printed. Ignored if there is no such page in the encyclopedia.
  
 
</noinclude><includeonly><!--
 
</noinclude><includeonly><!--
 
-->{{#if: {{{1|}}}<!--
 
-->{{#if: {{{1|}}}<!--
 
  -->|<!--  
 
  -->|<!--  
   --><!-- check if the page exists
+
   --><!-- convert to an array in case there are multiple values
   -->{{#if: {{IfObjectExists|object={{{1}}}|}}<!--
+
   -->{{#arraydefine: arrayTerms|{{{1|}}}|,|unique}}<!--
   -->|{{#show: {{{1}}}|?Indefinite Article|link=none}} {{#show: {{{1}}}|?Singular Lowercase|link=none}}<!--
+
  -->{{#arrayprint: arrayTerms||varTerm<!--
  -->|{{AnAWord| {{lc: {{{1}}} }} }}<!--
+
   -->|<!--
   -->}}<!-- if exists
+
    --><!-- check if the page exists
 +
    -->{{#if: {{IfObjectExists|object=varTerm|}}<!--
 +
    -->|<!--
 +
      -->{{#show: varTerm|?Indefinite Article|link=none}}&#32;<!--
 +
      -->{{#if: {{{2|}}}<!--
 +
      -->|[[varTerm|{{#show: varTerm|?Singular Lowercase|link=none}}]]<!--
 +
      -->|{{#show: varTerm|?Singular Lowercase|link=none}}<!--
 +
      -->}}<!-- if link
 +
      --><!--
 +
    -->|{{AnAWord|{{lc:varTerm}}}}<!--
 +
    -->}}<!-- if exists
 +
    --><!--
 +
  -->|print=pretty<!--
 +
   -->}}<!-- arrayprint
 
   --><!--  
 
   --><!--  
 
  -->|<!-- nothing to return
 
  -->|<!-- nothing to return
 
-->}}<!-- if  
 
-->}}<!-- if  
 
--></includeonly>
 
--></includeonly>

Latest revision as of 15:42, 10 January 2023

This template is used to print a singular lowercase form of each term in the string preceded by the respective article. If the respective page doesn't exist, the basic {{AnAWord| {{lc: term}} }} is used for each term in the string.

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

Parameters:

  • string - the term or terms (comma separated).
  • link - if given, links will be printed. Ignored if there is no such page in the encyclopedia.