Template:ReturnToParent: Difference between revisions
Spacetrain31 (talk | contribs) No edit summary |
Spacetrain31 (talk | contribs) No edit summary |
||
| Line 6: | Line 6: | ||
: <code><nowiki>{{Return to parent}}</nowiki></code> | : <code><nowiki>{{Return to parent}}</nowiki></code> | ||
: Automatically detects the parent page from the current page name. | : Automatically detects the parent page from the current page name. | ||
: Example: On " | : Example: On "Paige Hyland/Gallery" it displays "Return to Paige Hyland" | ||
; Specify custom parent page | ; Specify custom parent page | ||
| Line 30: | Line 30: | ||
|{{#if:{{{1|}}} | |{{#if:{{{1|}}} | ||
|[[{{{1}}}|← Return to {{{1}}}]] | |[[{{{1}}}|← Return to {{{1}}}]] | ||
|{{# | |{{#ifexist:{{BASEPAGENAME}} | ||
|[[{{BASEPAGENAME}}|← Return to {{BASEPAGENAME}}]] | |[[{{BASEPAGENAME}}|← Return to {{BASEPAGENAME}}]] | ||
|<span class="error"> | |{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | ||
|[[{{NAMESPACE}}:{{BASEPAGENAME}}|← Return to {{BASEPAGENAME}}]] | |||
|<span class="error">This is not a subpage</span> | |||
}} | }} | ||
}} | }} | ||
}} | }} | ||
}}</includeonly> | }}</includeonly> | ||