Difference between revisions of "Template:MWband"

From blackwiki
Jump to navigation Jump to search
imported>Sardanaphalus
(conditionals required, text-align:left, explanatory comments)
imported>Sardanaphalus
(Undid revision 639397033 by Sardanaphalus (talk))
Line 15: Line 15:
 
     | label3  = {{{wl_title|Wavelength range}}}
 
     | label3  = {{{wl_title|Wavelength range}}}
 
     |  data3  = {{{wave|}}}
 
     |  data3  = {{{wave|}}}
     <!--(No separate label4 as data4 usually a list)-->
+
     | label4  = {{{rb_title|Related bands}}}
    |  data4 = {{#if:{{{bands|}}} |<div style="text-align:left;"> '''{{{rb_title|Related bands}}}'''<br/>{{{bands}}} </div>}}
+
    |  data4  = {{{bands|}}}
  
 
     | header5 = {{{name2|}}}
 
     | header5 = {{{name2|}}}
Line 23: Line 23:
 
     | label7  = {{{wl2_title|Wavelength range}}}
 
     | label7  = {{{wl2_title|Wavelength range}}}
 
     |  data7  = {{{wave2|}}}
 
     |  data7  = {{{wave2|}}}
     <!--(No separate label8 as data4 usually a list)-->
+
     | label8  = {{{rb2_title|Related bands}}}
    | data8  = {{#if:{{{bands2|}}} |<div style="text-align:left;"> '''{{{rb2_title|Related bands}}}'''<br/>{{{bands2}}} </div>}}
+
    |  data8  = {{{bands2|}}}
 
}} }}
 
}} }}
 
{{Radio bands sidebar |title=omit}}</includeonly><noinclude>
 
{{Radio bands sidebar |title=omit}}</includeonly><noinclude>
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 22:36, 23 December 2014

Template documentation[view] [edit] [history] [purge]
  1. redirect Template:Parameter names example

Usage

Without parameters

For the sake of backward compatibility, the upper infobox opposite only appears if |freq= is passed. If freq is not passed, only the lower radio-bands sidebar will be shown.

With parameters

Frequency band
Frequency range75 to 110 GHz
Related bands

Template:Radio bands sidebar For example:

{{MWband
| name = Frequency band
| freq = 75 to 110 [[Hertz|GHz]]
| bands = {{hlist |[[V band]] |[[M band (NATO)|M band]]}}
}}

If a list (e.g. of bands) consists of more than a couple of items,

{{ublist|class=nowrap |...}}

is likely to produce a more reader-friendly result than

{{hlist(|item_style=white-space:nowrap;) |...}}.

Note: As entries for frequency and wavelength ranges include spaces (between numbers, ndashes, units), these fields do not word/linewrap. If, therefore, a newline/carriage-return is required in one of these fields, use e.g. <br/> or format the field with {{br list}} or {{ublist}}.

With name2 parameter

Frequency band
NATO frequency band
Frequency range40 – 60 GHz
Related bandsTemplate:Ublist
IEEE frequency band
Frequency range1 – 2 GHz
Related bandsTemplate:Ublist

Template:Radio bands sidebar If the name2 parameter is passed, the second set of parameters is also used and the template's overall heading is now specified by title rather than name. For example:

{{MWband
| title = Frequency band
| name = NATO frequency band
| freq = 40 – 60 [[Hertz|GHz]]
| bands = {{ublist|class=nowrap |[[V band]] (IEEE) |[[Extremely high frequency|EHF]] (ITU)}}
| name2 = IEEE frequency band
| freq2 = 1 – 2 GHz
| bands2 = {{ublist|class=nowrap |[[D band (NATO)|D band]] (NATO) |[[Super high frequency|SHF]] (ITU)}}
}}