Template:Airreg
{{{1}}}-{{{2}}}
This template employs intricate features of template syntax.
You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. Remember that you can conduct experiments, and should test all improvements, in either the general Template sandbox or your user space before changing anything here. |
The Airreg template can be used to generate footnote references to entries in aviation authority registries for the desired aircraft registration; for example: {{Airreg|N|470A}}
produces:
- N470A[1]
References
- ↑ "FAA Registry". Federal Aviation Administration.Page Module:Citation/CS1/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "Scribunto").
Only a limited number of national registries are supported (see below), i.e. those whose websites allow registration-based searches via URL parameters (HTTP GET requests).
Editors beware: formatting of code to make it "look nice" is likely to inadvertently introduce leading and trailing blank lines into the template output.
Usage
The template takes three positional parameters:
- Country prefix
- Registration string
- Punctuation (optional)
The prefix can be any of the ICAO country prefixes, although only for supported countries a footnote reference will be generated. For non-supported countries, the template simply outputs the registration in full, e.g. {{Airreg|TZ|AMK}}
produces
TZ-AMK
Any punctuation that is required to be placed before the citation marker (per WP:PAIC) can be specified as third parameter, e.g. {{Airreg|N|470A|,}}
produces:
- N470A,[1]
References
- ↑ "FAA Registry". Federal Aviation Administration.Page Module:Citation/CS1/styles.css must have content model "Sanitized CSS" for TemplateStyles (current model is "Scribunto").
Country prefixes supported
_ C | CF _> Canada G United Kingdom HB Switzerland N United States (see note 1) OY Denmark PH Netherlands _ PP | PR | PS > Brazil PT | PU _| VH Australia ZK New Zealand
Notes
- Pre-1949 registrations (NC, NX etc.) are not supported and cause the FAA registry website to return a 'Can Not Process Your Request At This Time' error. Use of the Airreg template in these cases is not recommended.
- South Korea (HL) and Japan (JA) are not supported, but are listed in the code among the supported prefixes, in order for the complete registration to be correctly outputted without a hyphen, unlike the default case that covers all other non-supported nations.
The above documentation is transcluded from Template:Airreg/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |