Jump to content

Template:EmbeddedSubpageLink: Difference between revisions

From Joepedia
Created page with "<includeonly>[[{{{1}}}{{#switch:{{SUBPAGENAME}}|{{{2}}}=/|#}}{{{2}}}|{{{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. Example: {{EmbeddedSubpageLink|Outer_Wilds|Echoes_of_the_Eye}} <templatedata> { "params": { "1": { "label": "Parent Page", "description": "The name of the parent page.", "type": "wiki-page-name", "required": tru..."
 
No edit summary
Line 3: Line 3:


Example:
Example:
{{EmbeddedSubpageLink|Outer_Wilds|Echoes_of_the_Eye}}
{{EmbeddedSubpageLink|Outer_Wilds|Echoes of the Eye}}


<templatedata>
<templatedata>

Revision as of 17:47, 25 January 2025

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: Echoes of the Eye

Links to an embedded subpage, most of the time this will link to the section of the parent article page for the subpage, but if you are on the subpage, it'll link to the subpage, this makes it treat it as the current page, which is nicer in navboxes and the like.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Parent Page1

The name of the parent page.

Page namerequired
Subpage/Section Name2

The name of the subpage (without the parent/ prefix). This must be the name of a section including the subpage into the parent page too.

Stringrequired