Difference between revisions of "Template:Term/Definition1"

From Maths
Jump to: navigation, search
m (Parameter typo)
(Adding plural support)
Line 2: Line 2:
  
 
     do link
 
     do link
     -->|[[{{{link|}}}|{{#if:{{{2|}}}|{{ucfirst:{{{text|}}}}}|{{{text|}}}}}]]<!--
+
     -->|[[{{{link|}}}|{{#if:{{{2|}}}|{{ucfirst:{{#if:{{{3|}}}|{{{plural|}}}|{{{text|}}}}}}}|{{#if:{{{3|}}}|{{{plural|}}}|{{{text|}}}}}}}]]<!--
  
 
     don't do link
 
     don't do link
     -->|{{#if:{{{2|}}}|{{ucfirst:{{{text|}}}}}|{{{text|}}}}}<!--
+
     -->|{{#if:{{{2|}}}|{{ucfirst:{{#if:{{{3|}}}|{{{plural|}}}|{{{text|}}}}}}}|{{#if:{{{3|}}}|{{{plural|}}}|{{{text|}}}}}}}<!--
 +
 
 +
For the text I use:
 +
COMMENT: {{#if:{{{3|}}}|{{{plural|}}}|{{{text|}}}}}<--THIS IS NOT CODE
  
 
-->}}<noinclude>
 
-->}}<noinclude>
Line 15: Line 18:
 
# "link" - something for link, nothing for not to link
 
# "link" - something for link, nothing for not to link
 
# "capitalise" - something to enforce capitlisation, nothing to leave ''unchanged'' - which ''may'' be capitalised already
 
# "capitalise" - something to enforce capitlisation, nothing to leave ''unchanged'' - which ''may'' be capitalised already
 +
# "plural" - something means yes, else no
 
Named:
 
Named:
 
* '''link''' - link text
 
* '''link''' - link text
 
* '''text''' - the text to display.
 
* '''text''' - the text to display.
 
</noinclude>
 
</noinclude>

Revision as of 19:31, 3 February 2018

Name

The 1 indicates "first version" - so I can change it without trashing pages if needed.

Changelog

  • Initial version saved Alec (talk) 19:06, 3 February 2018 (UTC)

Parameters

  1. "link" - something for link, nothing for not to link
  2. "capitalise" - something to enforce capitlisation, nothing to leave unchanged - which may be capitalised already
  3. "plural" - something means yes, else no

Named:

  • link - link text
  • text - the text to display.