Difference between revisions of "Template:Prop"

From Serious Documentation
Jump to: navigation, search
(Ignore this stuff below... that's the code for the template)
 
Line 9: Line 9:
 
:<nowiki>[[SHIP:Property:box:visible]]</nowiki>
 
:<nowiki>[[SHIP:Property:box:visible]]</nowiki>
 
which looks like this, and will be a link to SHIP:Property:visible
 
which looks like this, and will be a link to SHIP:Property:visible
:<span style="background-color:#CCCC88;">visible</span>
+
:<span style="background-color:#EEEE88;">visible</span>
  
 
Or you can also specify substitute label text like this:
 
Or you can also specify substitute label text like this:
Line 16: Line 16:
 
:<nowiki>[[SHIP:Property:box:visible|my alternate label]]</nowiki>
 
:<nowiki>[[SHIP:Property:box:visible|my alternate label]]</nowiki>
 
which looks like this, and will be a link to SHIP:Property:visible
 
which looks like this, and will be a link to SHIP:Property:visible
:<span style="background-color:#CCCC88;">my alternate label</span>
+
:<span style="background-color:#EEEE88;">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 node (e.g. box)}}{{#if: {{{2|}}} | | Must specify a property (e.g. visible)}}{{#if: {{{3|}}} | [[SHIP:Property:{{{1}}}:{{{2}}}|<span style="background-color:#CCCC88;">{{{3}}}</span>]] | [[SHIP:Property:{{{1}}}:{{{2}}}|<span style="background-color:#CCCC88;">{{{2}}}</span>]] }}
+
</noinclude>{{#if: {{{1|}}} | | Must specify a node (e.g. box)}}{{#if: {{{2|}}} | | Must specify a property (e.g. visible)}}{{#if: {{{3|}}} | [[SHIP:Property:{{{1}}}:{{{2}}}|<span style="background-color:#EEEE88;">{{{3}}}</span>]] | [[SHIP:Property:{{{1}}}:{{{2}}}|<span style="background-color:#EEEE88;">{{{2}}}</span>]] }}

Latest revision as of 09:54, 29 November 2012

Usage

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

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

{{Prop|box|visible}}

and it will output

[[SHIP:Property:box:visible]]

which looks like this, and will be a link to SHIP:Property:visible

visible

Or you can also specify substitute label text like this:

{{Prop|box|visible|my alternate label}}

and it will output

[[SHIP:Property:box:visible|my alternate label]]

which looks like this, and will be a link to SHIP:Property:visible

my alternate label

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

Must specify a node (e.g. box)Must specify a property (e.g. visible)[[SHIP:Property:{{{1}}}:{{{2}}}|{{{2}}}]]