Template:EmbeddedSubpageLink: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
<includeonly>[[{{{1}}}{{#switch:{{SUBPAGENAME}}|{{{2}}}=/|&#35;}}{{{2}}}|{{{2}}}]]</includeonly><noinclude>
<includeonly>[[{{{1}}}{{#switch:{{SUBPAGENAME}}|{{{2}}}=/|&#35;}}{{{2}}}|{{{3|{{{2}}}}}}]]</includeonly><noinclude>
Link to [[Patterns#Embedded Subpages]] nicely for Navboxes and other cases where showing if it is a link to the current page is important.
Link to [[Patterns#Embedded Subpages]] nicely for Navboxes and other cases where showing if it is a link to the current page is important.


Example:
Example:
{{EmbeddedSubpageLink|Outer_Wilds|Echoes of the Eye}}
<pre><nowiki>{{EmbeddedSubpageLink|Outer_Wilds|Echoes of the Eye}}</nowiki></pre>
{{EmbeddedSubpageLink|Outer Wilds|Echoes of the Eye}}
See how this becomes a self-link when viewed on [[Outer Wilds/Echoes of the Eye]] in the navbox.


<templatedata>
<templatedata>
Line 19: Line 21:
"type": "string",
"type": "string",
"required": true
"required": true
},
"3": {
"label": "Title",
"description": "Used to override the text of the link, by default this will be the subpage name.",
"type": "string"
}
}
},
},