Template:Site: Difference between revisions
Jump to navigation
Jump to search
[checked revision] | [checked revision] |
(→Arguments: More precise explanation) |
(+ argument comment) |
||
Line 1: | Line 1: | ||
<includeonly>[{{{1}}} {{#if:{{{2|}}}|{{{2}}}|{{#if:{{{text|}}}|{{{text}}}|{{{1}}}}}}}] ''({{rml}} website{{#if:{{{type|}}}|, {{{type}}}}}{{#if:{{{lang|}}}|, {{{lang}}}}})''[[kategorie:External Link]]</includeonly><noinclude> | <includeonly>[{{{1}}} {{#if:{{{2|}}}|{{{2}}}|{{#if:{{{text|}}}|{{{text}}}|{{{1}}}}}}}] ''({{rml}} website{{#if:{{{type|}}}|, {{{type}}}}}{{#if:{{{lang|}}}|, {{{lang}}}}}{{#if:{{{comment|}}}|; {{{comment}}}}})''[[kategorie:External Link]]</includeonly><noinclude> | ||
==Usage== | ==Usage== | ||
Use this template, whenever you set links to the railml.org website ([http.://railml.org http.://railml.org]). | Use this template, whenever you set links to the railml.org website ([http.://railml.org http.://railml.org]). | ||
Line 7: | Line 7: | ||
For Links to other websites, please use [[Template:External]]. | For Links to other websites, please use [[Template:External]]. | ||
=== Arguments === | === Arguments === | ||
The template has an obligatory and | The template has an obligatory and four optional argument: | ||
*Obligatory; unnamed | *Obligatory; unnamed | ||
**'''1''': the link target, e.g. http://railml.org | **'''1''': the link target, e.g. http://railml.org | ||
Line 14: | Line 14: | ||
**''type'': the file type, e.g. PDF | **''type'': the file type, e.g. PDF | ||
**''lang'': the language of the link target file, e.g. EN | **''lang'': the language of the link target file, e.g. EN | ||
**''comment'': a comment to be displayed within the brackets | |||
If the second argument is unnamed (example: <nowiki>{{site|http://example.ex|some example text}}</nowiki>), it will be interpreted as link text. If the second argument is named (example:<nowiki>{{site|http://example.ex|type=some file format}}</nowiki>), it will be interpreted according to the argument name. | If the second argument is unnamed (example: <nowiki>{{site|http://example.ex|some example text}}</nowiki>), it will be interpreted as link text. If the second argument is named (example:<nowiki>{{site|http://example.ex|type=some file format}}</nowiki>), it will be interpreted according to the argument name. | ||
Line 36: | Line 37: | ||
|<nowiki>{{site|http://railml.org|Our homepage|type=HTML|lang=EN}}</nowiki> | |<nowiki>{{site|http://railml.org|Our homepage|type=HTML|lang=EN}}</nowiki> | ||
|[http://railml.org {{#if:Our homepage|Our homepage|{{#if:|{{{text}}}|http://railml.org}}}}] ''({{rml}} website{{#if:HTML|, HTML}}{{#if:EN|, EN}})'' | |[http://railml.org {{#if:Our homepage|Our homepage|{{#if:|{{{text}}}|http://railml.org}}}}] ''({{rml}} website{{#if:HTML|, HTML}}{{#if:EN|, EN}})'' | ||
|- | |||
|<nowiki>{{site|http://de.wiki.railvivid.railml.org|type=HTML|lang=DE|comment=In Development}}</nowiki> | |||
|{{site|http://de.wiki.railvivid.railml.org|type=HTML|lang=DE|comment=In Development}} | |||
|} | |} | ||
[[kategorie:ContentTemplate]] | [[kategorie:ContentTemplate]] | ||
</noinclude> | </noinclude> |
Revision as of 13:41, 13 April 2016
Usage
Use this template, whenever you set links to the railml.org website ([http.://railml.org http.://railml.org]).
This template grants that links out of this wiki will be collected in category:External Link. So we keep an overview of external links and control their actuality routinely.
For Links to other websites, please use Template:External.
Arguments
The template has an obligatory and four optional argument:
- Obligatory; unnamed
- 1: the link target, e.g. http://railml.org
- Optional
- 2 or text: the link text. If it is empty, the link target will be used as link text. This argument can be used both named or unnamed.
- type: the file type, e.g. PDF
- lang: the language of the link target file, e.g. EN
- comment: a comment to be displayed within the brackets
If the second argument is unnamed (example: {{site|http://example.ex|some example text}}), it will be interpreted as link text. If the second argument is named (example:{{site|http://example.ex|type=some file format}}), it will be interpreted according to the argument name.
Examples
Code | Output |
{{site|http://railml.org}} | http://railml.org (railML® website) |
{{site|http://railml.org|Our homepage}} | Our homepage (railML® website) |
{{site|http://railml.org|type=HTML}} | http://railml.org (railML® website, HTML) |
{{site|http://railml.org|lang=EN|text=Our homepage}} | Our homepage (railML® website, EN) |
{{site|http://railml.org|Our homepage|type=HTML|lang=EN}} | Our homepage (railML® website, HTML, EN) |
{{site|http://de.wiki.railvivid.railml.org|type=HTML|lang=DE|comment=In Development}} | http://de.wiki.railvivid.railml.org (railML® website, HTML, DE
|