Difference between revisions of "Template:SysVar"

From Serious Documentation
Jump to: navigation, search
(Created page with "<noinclude> == Usage == This template should be used whenever you reference a '''System Variable''', like "shiplaunch". It puts a link to SHIP:System_Variable:(name) but give...")
 
 
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>{{Reserved|true}}</nowiki>
+
:<nowiki>{{SysVar|shiplaunch}}</nowiki>
  
 
and it will output
 
and it will output
 
:<nowiki>[[SHIP:System_Variable:shiplaunch|shiplaunch]]</nowiki>
 
:<nowiki>[[SHIP:System_Variable:shiplaunch|shiplaunch]]</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:Node:resources
:<code>true</code>
+
:<code>shiplaunch</code>
  
 
Or you can also specify substitute label text like this:
 
Or you can also specify substitute label text like this:
:<nowiki>{{Reserved|shiplaunch|my alternate shiplaunch label}}</nowiki>
+
:<nowiki>{{SysVar|shiplaunch|my alternate label}}</nowiki>
 
and it will output
 
and it will output
:<nowiki>[[SHIP:System_Variable:shiplaunch|my alternate shiplaunch label]]</nowiki>
+
:<nowiki>[[SHIP:System_Variable:shiplaunch|my alternate label]]</nowiki>
which looks like this, and will be a link to SHIP:Node:System Variable:shiplaunch
+
which looks like this, and will be a link to SHIP:System_Variable:shiplaunch
:<span style="background-color:#CCCCFF;">my shiplaunch alternate label</span>
+
:<span style="background-color:#CCCCFF;">my alternate label</span>
  
 
== 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:Node:System Variable:{{{1}}}|<span style="background-color:#CCCCFF;">{{{2}}}</span>]] |  [[SHIP:Node:System Variable:{{{1}}}|<span style="background-color:#CCCCFF;">{{{1}}}</span>]] }}
+
</noinclude>{{#if: {{{1|}}} | | Must specify a reserved word (e.g. true)}}{{#if: {{{2|}}} | [[SHIP:System_Variable:{{{1}}}|<span style="background-color:#CCCCFF;">{{{2}}}</span>]] |  [[SHIP:System_Variable:{{{1}}}|<span style="background-color:#CCCCFF;">{{{1}}}</span>]] }}

Latest revision as of 16:47, 4 February 2013

Usage

This template should be used whenever you reference a System Variable, like "shiplaunch". It puts a link to SHIP:System_Variable:(name) but gives us the future option of styling these differently and consistently.

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

{{SysVar|shiplaunch}}

and it will output

[[SHIP:System_Variable:shiplaunch|shiplaunch]]

which looks like this, and will be a link to SHIP:Node:resources

shiplaunch

Or you can also specify substitute label text like this:

{{SysVar|shiplaunch|my alternate label}}

and it will output

[[SHIP:System_Variable:shiplaunch|my alternate label]]

which looks like this, and will be a link to SHIP:System_Variable:shiplaunch

my alternate label

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

Must specify a reserved word (e.g. true)[[SHIP:System_Variable:{{{1}}}|{{{1}}}]]