Difference between revisions of "Template:Protocol"

From Serious Documentation
Jump to: navigation, search
(Created page with "<noinclude> == Usage == This template should be used whenever you reference a protocol type name, like "Modbus" or "Bridge". It puts a link to Protocol:(name) but gives us th...")
 
Line 9: Line 9:
 
:<nowiki>[[Protocol:Modbus|Modbus]]</nowiki>
 
:<nowiki>[[Protocol:Modbus|Modbus]]</nowiki>
 
which looks like this, and will be a link to Protocol:Modbus
 
which looks like this, and will be a link to Protocol:Modbus
:<span style="background-color:#EEEE88;">Modbus protocol</span>
+
:<span style="background-color:#EECC88;">Modbus protocol</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>[[Protocol:Modbus|my label]]</nowiki>
 
:<nowiki>[[Protocol:Modbus|my label]]</nowiki>
 
which looks like this, and will be a link to Protocol:Modbus
 
which looks like this, and will be a link to Protocol:Modbus
:<span style="background-color:#EEEE88;">my label</span>
+
:<span style="background-color:#EECC88;">my 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 protocol type (e.g. Modbus)}}{{#if: {{{2|}}} | [[Protocol:{{{1}}}|<span style="background-color:#EEEE88;">''{{{2}}}'' protocol</span>]] |  [[Protocol:{{{1}}}|<span style="background-color:#EEEE88;">''{{{1}}}''</span>]] }}
+
</noinclude>{{#if: {{{1|}}} | | Must specify a protocol type (e.g. Modbus)}}{{#if: {{{2|}}} | [[Protocol:{{{1}}}|<span style="background-color:#EECC88;">''{{{2}}}'' protocol</span>]] |  [[Protocol:{{{1}}}|<span style="background-color:#EECC88;">''{{{1}}}''</span>]] }}

Revision as of 04:38, 21 September 2014

Usage

This template should be used whenever you reference a protocol type name, like "Modbus" or "Bridge". It puts a link to Protocol:(name) but gives us the future option of styling these differently and consistently.

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

{{Protocol|Modbus}}

and it will output

[[Protocol:Modbus|Modbus]]

which looks like this, and will be a link to Protocol:Modbus

Modbus protocol

Or you can also specify substitute label text like this:

{{Protocol|Modbus|my label}}

and it will output

[[Protocol:Modbus|my label]]

which looks like this, and will be a link to Protocol:Modbus

my label

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

Must specify a protocol type (e.g. Modbus)[[Protocol:{{{1}}}|{{{1}}}]]