Difference between revisions of "Template:GCM/doc"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(create documentation file)
 
imported>Zyxw
(document second unnamed parameter)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 +
'''[[Template:GCM]]''' generates an external link to an airport information page at the Great Circle Mapper website. The links are used as a reference in airport articles when a better source is not available online (such as a link to the [[Aeronautical Information Publication]]).
  
 
=== Usage ===
 
=== Usage ===
This template generates a link to an airport information page at the Great Circle Mapper web site.
+
The template requires one unnamed parameter which can be either the [[International Air Transport Association airport code|IATA]] or the [[International Civil Aviation Organization airport code|ICAO]] airport [[location identifier]].
 
 
It accepts one unnamed parameter which can be either the [[IATA airport code]] or the [[ICAO airport code]].
 
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
 
 
! Code:
 
! Code:
| <code><nowiki>{{GCM|EBA}}</nowiki></code>
+
| <code><nowiki>{{GCM|AAA}}</nowiki></code>
 
|-
 
|-
 
! Result:
 
! Result:
| {{GCM|EBA}}
+
| {{GCM|AAA}}
|-
+
|}
 +
 
 +
{| class="wikitable"
 
! Code:
 
! Code:
| <code><nowiki>{{GCM|LIRJ}}</nowiki></code>
+
| <code><nowiki>{{GCM|ZMAT}}</nowiki></code>
 
|-
 
|-
 
! Result:
 
! Result:
| {{GCM|LIRJ}}
+
| {{GCM|ZMAT}}
 
|}
 
|}
  
The template also accepts one named parameter which can be used to specify the source of the airport information found on the website.
+
An optional second unnamed parameter can be used to display the airport name in place of the identifier.
  
 
{| class="wikitable"
 
{| class="wikitable"
|-
 
 
! Code:
 
! Code:
| <code><nowiki>{{GCM|LIRJ|source=DAFIF}}</nowiki></code>
+
| <code><nowiki>{{GCM|AAA|Anaa Airport}}</nowiki></code>
 
|-
 
|-
 
! Result:
 
! Result:
| {{GCM|LIRJ|source=DAFIF}}
+
| {{GCM|AAA|Anaa Airport}}
|-
+
|}
 +
 
 +
{| class="wikitable"
 
! Code:
 
! Code:
| <code><nowiki>{{GCM|LIRJ|source=[[DAFIF]]}}</nowiki></code>
+
| <code><nowiki>{{GCM|ZMAT|Altai Airport}}</nowiki></code>
 
|-
 
|-
 
! Result:
 
! Result:
| {{GCM|LIRJ|source=[[DAFIF]]}}
+
| {{GCM|ZMAT|Altai Airport}}
|-
+
|}
 +
 
 +
The optional '''source''' parameter can be used to replace the default text.
 +
 
 +
{| class="wikitable"
 
! Code:
 
! Code:
| <code><nowiki>{{GCM|LIRJ|source=FAA}}</nowiki></code>
+
| <code><nowiki>{{GCM|BIKF|source=[[AIP Iceland]], [[DAFIF]], [[NOAA]]}}</nowiki></code>
 
|-
 
|-
 
! Result:
 
! Result:
| {{GCM|LIRJ|source=FAA}}
+
| {{GCM|BIKF|source=[[AIP Iceland]], [[DAFIF]], [[NOAA]]}}
|-
+
|}
 +
 
 +
{| class="wikitable"
 
! Code:
 
! Code:
| <code><nowiki>{{GCM|LIRJ|source=[[FAA]]}}</nowiki></code>
+
| <code><nowiki>{{GCM|AAJ|Cayana Airstrip|source=}}</nowiki></code>
 
|-
 
|-
 
! Result:
 
! Result:
| {{GCM|LIRJ|source=[[FAA]]}}
+
| {{GCM|AAJ|Cayana Airstrip|source=}}
 
|}
 
|}
  
 
=== See also ===
 
=== See also ===
* [[Template:WAD]]
+
* [[Template:WAD]] - creates external link for airport information when given ICAO identifier
* [[Template:ASN]]
+
* [[Template:ASN]] - creates external link for airport accident information when given IATA identifier
  
 
<includeonly>
 
<includeonly>

Revision as of 05:17, 5 October 2008

Template:GCM generates an external link to an airport information page at the Great Circle Mapper website. The links are used as a reference in airport articles when a better source is not available online (such as a link to the Aeronautical Information Publication).

Usage

The template requires one unnamed parameter which can be either the IATA or the ICAO airport location identifier.

Code: {{GCM|AAA}}
Result: Airport information for AAA at Great Circle Mapper.
Code: {{GCM|ZMAT}}
Result: Airport information for ZMAT at Great Circle Mapper.

An optional second unnamed parameter can be used to display the airport name in place of the identifier.

Code: {{GCM|AAA|Anaa Airport}}
Result: Airport information for Anaa Airport at Great Circle Mapper.
Code: {{GCM|ZMAT|Altai Airport}}
Result: Airport information for Altai Airport at Great Circle Mapper.

The optional source parameter can be used to replace the default text.

Code: {{GCM|BIKF|source=[[AIP Iceland]], [[DAFIF]], [[NOAA]]}}
Result: Airport information for BIKF at Great Circle Mapper. Source: AIP Iceland, DAFIF, NOAA.
Code: {{GCM|AAJ|Cayana Airstrip|source=}}
Result: Airport information for Cayana Airstrip at Great Circle Mapper.

See also

  • Template:WAD - creates external link for airport information when given ICAO identifier
  • Template:ASN - creates external link for airport accident information when given IATA identifier