Difference between revisions of "Template:Reserved"

From Serious Documentation
Jump to: navigation, search
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
== Usage ==
 
== Usage ==
This template should be used whenever you reference a '''Reserved Word''', like "true".  It puts a link to SHIP:Reserved_Words#(word) but gives us the future option of styling these differently and consistently.
+
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:
 
You can just use the name of the node, like this:
:<nowiki>{{Reserved|true}}</nowiki>
+
:<nowiki>{{Constant|TOUCH.UP}}</nowiki>
  
 
and it will output
 
and it will output
:<nowiki>[[SHIP:Reserved_Words#true|true]]</nowiki>
+
:<nowiki>[[SHIP:Constants:TOUCH.UP|TOUCH.UP]]</nowiki>
which looks like this, and will be a link to SHIP:Node:resources
+
which looks like this, and will be a link to SHIP:Constants:TOUCH.UP
:<code>true</code>
+
:<code>TOUCH.UP</code>
  
 
Or you can also specify substitute label text like this:
 
Or you can also specify substitute label text like this:
:<nowiki>{{Reserved|true|my alternate label}}</nowiki>
+
:<nowiki>{{Constant|TOUCH.UP|my alternate label}}</nowiki>
 
and it will output
 
and it will output
:<nowiki>[[SHIP:Reserved_Words#true|alternate label]]</nowiki>
+
:<nowiki>[[SHIP:Constant:TOUCH.UP|my alternate label]]</nowiki>
which looks like this, and will be a link to SHIP:Node:resources
+
which looks like this, and will be a link to SHIP:Constant:TOUCH.UP
:<code>alternate label</code>
+
:<code>my alternate label</code>
  
 
== Ignore this stuff below... that's the code for the template ==
 
== Ignore this stuff below... that's the code for the template ==
</noinclude>{{#if: {{{1|}}} | | Must specify a reserved word (e.g. true)}}{{#if: {{{2|}}} | [[SHIP:Reserved_Words#{{{1}}}|<code>{{{2}}}</code>]] |  [[SHIP:Reserved_Words#{{{1}}}|<code>{{{1}}}</code>]] }}
+
</noinclude>{{#if: {{{1|}}} | | Must specify a constant (e.g. TOUCH.UP)}}{{#if: {{{2|}}} | [[SHIP:Constants:{{{1}}}|<code>{{{2}}}</code>]] |  [[SHIP:Constants:{{{1}}}|<code>{{{1}}}</code>]] }}

Revision as of 10:38, 1 February 2013

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:

{{Constant|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:

{{Constant|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}}}]]