Template:Doc/parent2: Difference between revisions

From railML 3 Wiki
Jump to navigation Jump to search
[checked revision][checked revision]
(Created page with "<includeonly><noinclude> First ifeq: If there is no parent, do nothing </noinclude>{{#ifeq:{{{1|}}}|||<noinclude> If this is wiki2 and the link does not go to wiki3, place the parent </noinclude>{{#ifeq:{{thiswiki}}|wiki2|{{#ifeq:{{{2|}}}|3||_{{{1}}}}}}}<noinclude> If this is wiki3 and the link goes to wiki2, place the parent </noinclude>{{#ifeq:{{thiswiki}}|wiki3|{{#ifeq:{{{2|}}}|2|_{{{1}}}}}}}<noinclude> If this is the rtm Wiki and the link does not go to wiki3, place...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
If this is wiki3 and the link goes to wiki2, place the parent
If this is wiki3 and the link goes to wiki2, place the parent
</noinclude>{{#ifeq:{{thiswiki}}|wiki3|{{#ifeq:{{{2|}}}|2|_{{{1}}}}}}}<noinclude>
</noinclude>{{#ifeq:{{thiswiki}}|wiki3|{{#ifeq:{{{2|}}}|2|_{{{1}}}}}}}<noinclude>
If this is the rtm Wiki and the link does not go to wiki3, place the parent
If this is the rtm Wiki and the link goes to wiki2, place the parent
</noinclude>{{#ifeq:{{thiswiki}}|topo|{{#ifeq:{{{2|}}}|3||_{{{1}}}}}}}<noinclude>
</noinclude>{{#ifeq:{{thiswiki}}|topo|{{#ifeq:{{{2|}}}|2|_{{{1}}}}}}}<noinclude>
Close the first ifeq</noinclude>}}</includeonly><noinclude>
Close the first ifeq</noinclude>}}</includeonly><noinclude>
== Usage ==
== Usage ==
Line 15: Line 15:
*2: <nowiki>{{{wiki|}}}</nowiki> of [[Template:Doc]]
*2: <nowiki>{{{wiki|}}}</nowiki> of [[Template:Doc]]
== Examples ==
== Examples ==
<pre>{{doc/parent3}}</pre>returns:
<pre>{{doc/parent2}}</pre>returns:


{{doc/parent3}}
{{doc/parent2}}
<pre>{{doc/parent3|signalIS}}</pre>returns:
<pre>{{doc/parent2|signalIS}}</pre>returns:


{{doc/parent3|signalIS}}
{{doc/parent2|signalIS}}
<pre>{{doc/parent3|signalIS|2}}</pre>returns:
<pre>{{doc/parent2|signalIS|2}}</pre>returns:


{{doc/parent3|signalIS|2}}
{{doc/parent2|signalIS|2}}
<pre>{{doc/parent3|signalIS|3}}</pre>returns:
<pre>{{doc/parent2|signalIS|3}}</pre>returns:


{{doc/parent3|signalIS|3}}
{{doc/parent2|signalIS|3}}
<pre>{{doc/parent3|2=2}}</pre>returns:
<pre>{{doc/parent3|2=2}}</pre>returns:


{{doc/parent3|2=2}}
{{doc/parent2|2=2}}
<pre>{{doc/parent3|2=3}}</pre>returns:
<pre>{{doc/parent3|2=3}}</pre>returns:


{{doc/parent3|2=3}}
{{doc/parent2|2=3}}


[[category:Subtemplate]]
[[category:Subtemplate]]
{{interwiki|2=all}}
{{interwiki|2=all}}
</noinclude>
</noinclude>

Latest revision as of 21:09, 17 March 2025

Usage

Template supporting Template:Doc. Fits the parent to the respective wiki.

Arguments

Examples

{{doc/parent2}}

returns:


{{doc/parent2|signalIS}}

returns:


{{doc/parent2|signalIS|2}}

returns:

_signalIS

{{doc/parent2|signalIS|3}}

returns:


{{doc/parent3|2=2}}

returns:


{{doc/parent3|2=3}}

returns: