Difference between revisions of "Template:Avinor link"

From blackwiki
Jump to navigation Jump to search
imported>Zyxw
(add option to include full English and Norwegian names, does not affect prior functionality)
imported>Elegie
(Fix broken links and use up-to-date HTTPS URLs in order to provide increased user privacy/security)
Line 1: Line 1:
*[http://www.avinor.no/en/airport/{{{1}}} Avinor entry for {{#if:{{{en|}}}|{{{en}}}|{{{2}}} Airport}}]
+
*[https://avinor.no/en/airport/{{{1}}}-airport/ Avinor entry for {{#if:{{{en|}}}|{{{en}}}|{{{2}}} Airport}}]
*[http://www.avinor.no/lufthavn/{{{1}}} Avinor entry for {{#if:{{{no|}}}|''{{{no}}}''|{{{2}}} Airport}}] {{no icon}} (more detail)<noinclude>
+
*[https://avinor.no/flyplass/{{{1}}}/ Avinor entry for {{#if:{{{no|}}}|''{{{no}}}''|{{{2}}} Airport}}] {{no icon}} (more detail)<noinclude>
 
----
 
----
 
{{documentation}}
 
{{documentation}}
 
<!-- Categories and interwikis can be found in the /doc subpage, don't add them here. -->
 
<!-- Categories and interwikis can be found in the /doc subpage, don't add them here. -->
 
</noinclude>
 
</noinclude>

Revision as of 08:32, 23 June 2017


Template documentation[view] [edit] [history] [purge]

This template is used to generate an external links to the Avinor page for airports in Norway. It generates links to both the English language and Norwegian language pages. The use of a template allows these links to be updated in one place if the URL changes.

Usage

Short form

Parameters:

  1. (unnamed) – airport name in the Avinor URL, such as bergen for https://avinor.no/en/airport/bergen-airport/ and https://avinor.no/flyplass/bergen/
  2. (unnamed) – airport name displayed, such as Bergen; the template automatically adds "Airport"

Usage: {{Avinor link|bergen|Bergen}}

Result:

Long form

Parameters:

  1. (unnamed) – airport name in the Avinor URL, such as bergen for https://avinor.no/en/airport/bergen-airport/ and https://avinor.no/flyplass/bergen/
  2. en – airport name displayed for English-language link, such as Bergen Airport, Flesland
  3. no – airport name displayed for Norwegian-language link, such as Bergen lufthavn, Flesland

Usage: {{Avinor link|bergen|en=Bergen Airport, Flesland|no=Bergen lufthavn, Flesland}}

Result:

See also