Template:External: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
(Added Parameters text, type, lang)
Line 12: Line 12:


==Examples==
==Examples==
<nowiki>{{external|http://uic.org}}</nowiki>
{|border="1"
 
|'''Code'''
delivers
|'''Output'''
 
|-
[http://uic.org http://uic.org] ''(external link)''
|<nowiki>{{external|http://www.uic.org}}</nowiki>
 
|[http://www.uic.org {{#if:|{{{2}}}|{{#if:|{{{text}}}|http://www.uic.org}}}}] ''(external link{{#if:|,&nbsp;{{{type}}}}}{{#if:|,&nbsp;{{{lang}}}}})''[[kategorie:External Link]]
<nowiki>{{external|http://uic.org|UIC homepage}}</nowiki>
|-
 
|<nowiki>{{external|http://www.uic.org|International Union of Railways}}</nowiki>
delivers
|[http://www.uic.org {{#if:International Union of Railways|International Union of Railways|{{#if:|{{{text}}}|http://www.uic.org}}}}] ''(external link{{#if:|,&nbsp;{{{type}}}}}{{#if:|,&nbsp;{{{lang}}}}})''[[kategorie:External Link]]
 
|-
[http://uic.org UIC homepage] ''(external link)''
|<nowiki>{{external|http://www.uic.org|type=PDF}}</nowiki>
|[http://www.uic.org {{#if:|{{{2}}}|{{#if:|{{{text}}}|http://www.uic.org}}}}] ''(external link{{#if:PDF|,&nbsp;PDF}}{{#if:|,&nbsp;{{{lang}}}}})''[[kategorie:External Link]]
|-
|<nowiki>{{external|http://www.uic.org|lang=EN|text=UIC}}</nowiki>
|[http://www.uic.org {{#if:|{{{2}}}|{{#if:UIC|UIC|http://www.uic.org}}}}] ''(external link{{#if:|,&nbsp;{{{type}}}}}{{#if:EN|,&nbsp;EN}})''[[kategorie:External Link]]
|}


[[kategorie:ContentTemplate]]
[[kategorie:ContentTemplate]]
</noinclude>
</noinclude>

Revision as of 17:33, 2 March 2016

Usage

Use this template, whenever you set external links.

This template grants that external links will be collected in category:External Link. So we keep an overview of external links and control their actuality routinely.

For Links to pages on the railML® (http://railml.org), please use Template:Site.

Options

The template has an obligatory and an optional argument:

  • The first, obligatory, argument is the link target
  • The second, optional argument is the link text. If it is empty, the link target will be used as link text.

Examples

Code Output
{{external|http://www.uic.org}} http://www.uic.org (external link)kategorie:External Link
{{external|http://www.uic.org|International Union of Railways}} International Union of Railways (external link)kategorie:External Link
{{external|http://www.uic.org|type=PDF}} http://www.uic.org (external link, PDF)kategorie:External Link
{{external|http://www.uic.org|lang=EN|text=UIC}} UIC (external link, EN)kategorie:External Link

kategorie:ContentTemplate