Difference between revisions of "Template:Const"

From Serious Documentation
Jump to: navigation, search
(Created page with "<noinclude> == Usage == This template should be used whenever you reference a '''Constant''', like "TOUCH.UP". It puts a link to SHIP:Constants:(word) but gives us the future...")
 
(Usage)
Line 4: Line 4:
  
 
You can just use the name of the node, like this:
 
You can just use the name of the node, like this:
:<nowiki>{{Constant|TOUCH.UP}}</nowiki>
+
:<nowiki>{{Const|TOUCH.UP}}</nowiki>
  
 
and it will output
 
and it will output
Line 12: Line 12:
  
 
Or you can also specify substitute label text like this:
 
Or you can also specify substitute label text like this:
:<nowiki>{{Constant|TOUCH.UP|my alternate label}}</nowiki>
+
:<nowiki>{{Const|TOUCH.UP|my alternate label}}</nowiki>
 
and it will output
 
and it will output
 
:<nowiki>[[SHIP:Constant:TOUCH.UP|my alternate label]]</nowiki>
 
:<nowiki>[[SHIP:Constant:TOUCH.UP|my alternate label]]</nowiki>

Revision as of 17:14, 25 July 2016

Usage

This template should be used whenever you reference a Constant, like "TOUCH.UP". It puts a link to SHIP:Constants:(word) but gives us the future option of styling these differently and consistently.

You can just use the name of the node, like this:

{{Const|TOUCH.UP}}

and it will output

[[SHIP:Constants:TOUCH.UP|TOUCH.UP]]

which looks like this, and will be a link to SHIP:Constants:TOUCH.UP

TOUCH.UP

Or you can also specify substitute label text like this:

{{Const|TOUCH.UP|my alternate label}}

and it will output

[[SHIP:Constant:TOUCH.UP|my alternate label]]

which looks like this, and will be a link to SHIP:Constant:TOUCH.UP

my alternate label

Ignore this stuff below... that's the code for the template

Must specify a constant (e.g. TOUCH.UP)[[SHIP:Constants:{{{1}}}|{{{1}}}]]