Difference between revisions of "Template:MWband/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Sardanaphalus
(Created using copy of current main template)
 
imported>Trialpears
(Syncing sandbox code with main template (sync-template-sandbox.js))
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<table style="background:transparent; float:right;">
+
<includeonly>{{#if:{{{freq|}}}
{{#if:{{{freq<includeonly>|</includeonly>}}}
+
| {{Infobox
| <tr><td>
+
    | bodyclass = hproduct
{{Infobox
+
    | titleclass = fn
| bodyclass = hproduct
+
    | titlestyle = padding-bottom:0.2em<!--(in case title would otherwise touch border)-->;
| bodystyle  = width:100%;
+
    | title = <span class="fn">{{#if:{{{name2|}}} |{{{title|{{PAGENAME}}}}} |{{{name|{{PAGENAME}}}}} }}</span>
| title     = <span class="fn">{{#if:
+
    | headerstyle = background:#ddf<!--(navbox-abovebelow class)-->;
{{{name2<includeonly>|</includeonly>}}}
+
    | labelstyle = padding-top:0.15em;padding-right:1.0em<!--(to ensure gap between label and data on same line)-->;
| {{{title<includeonly>|{{PAGENAME}}</includeonly>}}}
+
 
| {{{name<includeonly>|{{PAGENAME}}</includeonly>}}}
+
    | header1 = {{#if:{{{name2|}}} |{{{name|}}} }}
}}</span>
+
    | label2 = {{longitem|{{{freq_title|Frequency range}}}}}
| titleclass = fn
+
    | data2 = {{#if:{{{freq|}}} |{{nowrap|{{{freq}}}}} }}
| header1   ={{#if:
+
    | label3 = {{longitem|{{{wl_title|Wavelength range}}}}}
{{{name2<includeonly>|</includeonly>}}}
+
    | data3 = {{#if:{{{wave|}}} |{{nowrap|{{{wave}}}}} }}
| {{{name<includeonly>|</includeonly>}}}
+
    | label4 = {{longitem|{{{rb_title|Related bands}}}}}
}}
+
    | data4 = {{{bands|}}}
| label2     = {{{freq_title|Frequency range}}}
+
 
| data2     = {{{freq<includeonly>|</includeonly>}}}
+
    | header5 = {{{name2|}}}
| label3     = {{{wl_title|Wavelength range}}}
+
    | label6 = {{longitem|{{{freq2_title|Frequency range}}}}}
| data3     = {{{wave<includeonly>|</includeonly>}}}
+
    | data6 = {{#if:{{{freq2|}}} |{{nowrap|{{{freq2}}}}} }}
| label4     = {{{rb_title|Related bands}}}
+
    | label7 = {{longitem|{{{wl2_title|Wavelength range}}}}}
| data4     = {{{bands<includeonly>|</includeonly>}}}
+
    | data7 = {{#if:{{{wave2|}}} |{{nowrap|{{{wave2}}}}} }}
| header5   = {{{name2<includeonly>|</includeonly>}}}
+
    | label8 = {{longitem|{{{rb2_title|Related bands}}}}}
| label6     = {{{freq2_title|Frequency range}}}
+
    | data8 = {{{bands2|}}}
| data6     = {{{freq2<includeonly>|</includeonly>}}}
+
}} }}
| label7     = {{{wl2_title|Wavelength range}}}
+
{{Radio bands sidebar |title=omit}}</includeonly><noinclude>
| data7     = {{{wave2<includeonly>|</includeonly>}}}
 
| label8     = {{{rb2_title|Related bands}}}
 
| data8     = {{{bands2<includeonly>|</includeonly>}}}
 
}}</td></tr>
 
}}<tr><td>
 
{| class="infobox" style="text-align:center; width:100%;"
 
! [[ITU Radio Bands|ITU Radio Band Numbers]]
 
|-
 
| style="font-size: 90%;" |
 
[[Extremely low frequency|1]]
 
[[Super low frequency|2]]
 
[[Ultra low frequency|3]]
 
[[Very low frequency|4]]
 
[[Low frequency|5]]
 
[[Medium frequency|6]]
 
[[High frequency|7]]
 
[[Very high frequency|8]]
 
[[Ultra high frequency|9]]
 
[[Super high frequency|10]]
 
[[Extremely high frequency|11]]
 
[[Terahertz radiation|12]]
 
|-
 
! [[ITU Radio Bands|ITU Radio Band Symbols]]
 
|-
 
| style="font-size: 90%;" |
 
[[Extremely low frequency|ELF]]
 
[[Super low frequency|SLF]]
 
[[Ultra low frequency|ULF]]
 
[[Very low frequency|VLF]]
 
[[Low frequency|LF]]
 
[[Medium frequency|MF]]
 
[[High frequency|HF]]
 
[[Very high frequency|VHF]]
 
[[Ultra high frequency|UHF]]
 
[[Super high frequency|SHF]]
 
[[Extremely high frequency|EHF]]
 
[[Terahertz radiation|THF]]
 
|-
 
! [[Radio spectrum#EU, NATO, US ECM frequency designations|NATO Radio bands]]
 
|-
 
| style="font-size: 90%;" |
 
[[A band (radio)|A]]
 
[[B band|B]]
 
[[C band|C]]
 
[[D band|D]]
 
[[E band|E]]
 
[[F band|F]]
 
[[G band|G]]
 
[[H band|H]]
 
[[I band|I]]
 
[[J band|J]]
 
[[K band|K]]
 
[[L band (template)|L]]
 
[[M band|M]]
 
|-
 
! [[radio spectrum#IEEE|IEEE Radar bands]]
 
|-
 
| style="font-size: 90%;" |
 
[[High frequency|HF]]
 
[[Very high frequency|VHF]]
 
[[Ultra high frequency|UHF]]
 
[[L band (template)|L]]
 
[[S band|S]]
 
[[C band|C]]
 
[[X band|X]]
 
[[Ku band|K<sub>u</sub>]]
 
[[K band|K]]
 
[[Ka band|K<sub>a</sub>]]
 
[[V band|V]]
 
[[W band|W]]
 
[[Extremely high frequency|mm]]
 
|-
 
! Television and radio bands
 
|-
 
| style="font-size: 90%;" |
 
[[Band I|I]]
 
[[Band II|II]]
 
[[Band III|III]]
 
[[Band IV|IV]]
 
[[Band V|V]]
 
[[Band VI|VI]]
 
|- class="editlink noprint plainlinks plainlinksneverexpand small selfreference"
 
| [[Template:MWband|v]] [[Template talk:MWband|d]] [{{fullurl:Template:MWband|action=edit}} e]
 
|}</td>
 
</tr>
 
</table><noinclude>
 
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 18:07, 2 October 2019

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 range
75 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 range
40 – 60 GHz
Related bands
Template:Ublist
IEEE frequency band
Frequency range
1 – 2 GHz
Related bands
Template: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)}}
}}