Difference between revisions of "Template:Node"

From Serious Documentation
Jump to: navigation, search
(Ignore this stuff below... that's the code for the template)
 
(2 intermediate revisions by the same user not shown)
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>{{NodeName|resources}}</nowiki>
+
:<nowiki>{{Node|resources}}</nowiki>
  
 
and it will output
 
and it will output
 
:<nowiki>[[SHIP:Node:resources|resources]]</nowiki>
 
:<nowiki>[[SHIP:Node:resources|resources]]</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
:resources
+
:''resources''
  
 
Or you can also specify substitute label text like this:
 
Or you can also specify substitute label text like this:
:<nowiki>{{NodeName|resources|my resources node label}}</nowiki>
+
:<nowiki>{{Node|resources|my resources node label}}</nowiki>
 
and it will output
 
and it will output
 
:<nowiki>[[SHIP:Node:resources|my resources node label]]</nowiki>
 
:<nowiki>[[SHIP:Node:resources|my resources node 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:Node:resources
:my resources node label
+
:''my resources node label''
  
 
== 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 node type (e.g. box)}}{{#if: {{{2|}}} | [[SHIP:Node:{{{1}}}|{{{2}}}]] |  [[SHIP:Node:{{{1}}}|{{{1}}}]] }}
+
</noinclude>{{#if: {{{1|}}} | | Must specify a node type (e.g. box)}}{{#if: {{{2|}}} | [[SHIP:Node:{{{1}}}|''{{{2}}}'']] |  [[SHIP:Node:{{{1}}}|''{{{1}}}'']] }}

Latest revision as of 07:06, 27 November 2012

Usage

This template should be used whenever you reference a node type name, like "resources" or "box". It puts a link to SHIP:Node:(name) but gives us the future option of styling these differently and consistently.

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

{{Node|resources}}

and it will output

[[SHIP:Node:resources|resources]]

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

resources

Or you can also specify substitute label text like this:

{{Node|resources|my resources node label}}

and it will output

[[SHIP:Node:resources|my resources node label]]

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

my resources node label

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

Must specify a node type (e.g. box)[[SHIP:Node:{{{1}}}|{{{1}}}]]