Template:Wiki2: Difference between revisions

From railML 2 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#if:{{{2|}}}|[[{{{1}}}|{{{2}}}]]|[[{{{1|#}}}|{{{1|The {{rml}} 2 wiki}}}]]}}</includeonly><noinclude>
<includeonly>{{#if:{{{2|}}}|[[{{{1}}}|{{{2}}}]]|[[{{{1|#}}}|{{{1|The {{rml|2|link=no}} wiki}}}]]}}</includeonly><noinclude>
==Usage==
==Usage==
This template fixes links to the {{wiki2|#|{{rml}} 2 wiki}} for mirrored pages. Within the {{wiki3|#|{{rml}} 3 wiki}} it produces an interwiki link. Within the {{rml}} 2 wiki it links internally. Analogously, there exists [[Template:Wiki3]].
This template fixes links to the {{wiki2|#|{{rml|2|link=no}} wiki}} for mirrored pages. Within the {{wiki3|#|{{rml|3|link=no}} wiki}} it produces an interwiki link. Within the {{rml|2}} wiki it links internally. Analogously, there exists [[Template:Wiki3]].
===Arguments===
===Arguments===
*'''1''' (optionally): The link target. The default value is '''#''', which will link to the respective main page.
*'''1''' (optionally): The link target. The default value is '''#''', which will link to the respective main page.
*'''2''' (optionally): The link text, if different to the target.
*'''2''' (optionally): The link text, if different to the target.
{{note|Links within <nowiki>{{{2}}}</nowiki> will cause errors!<br>E.g.: use <nowiki>{{rml|link=no}}</nowiki> instead of <nowiki>{{rml}}</nowiki>|error}}
==Examples==
==Examples==
<pre>{{wiki2}}</pre>delivers:
<pre>{{wiki2}}</pre>delivers:
Line 14: Line 16:
<pre>{{wiki2|CO:railml|The {{rml}} root element}}</pre>delivers:
<pre>{{wiki2|CO:railml|The {{rml}} root element}}</pre>delivers:


{{wiki2|CO:railml|The {{rml}} root element}}
{{wiki2|CO:railml|The {{rml|link=no}} root element}}


{{interwiki}}
{{interwiki}}
[[category:Template]]
[[category:Template]]
</noinclude>
</noinclude>

Latest revision as of 13:39, 7 June 2023

Usage

This template fixes links to the railML® 2 wiki for mirrored pages. Within the railML® 3 wiki it produces an interwiki link. Within the railML® 2 wiki it links internally. Analogously, there exists Template:Wiki3.

Arguments

  • 1 (optionally): The link target. The default value is #, which will link to the respective main page.
  • 2 (optionally): The link text, if different to the target.
Links within {{{2}}} will cause errors!
E.g.: use {{rml|link=no}} instead of {{rml}}


Examples

{{wiki2}}

delivers:

The railML® 2 wiki

{{wiki2|Infrastructure}}

delivers:

Infrastructure

{{wiki2|CO:railml|The {{rml}} root element}}

delivers:

The railML® root element