Template:SubPage BackLink

From Ring of Brodgar
Revision as of 10:51, 20 August 2023 by MvGulik (talk | contribs) (+"page=<target page>" option (allowing for more general usage).)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Template documentation (for the template shown above, sometimes hidden or invisible)
(Main) Purpose
Drops a link to the parent-page from a sub-page.
In page-name "MainPage / sub1 / sub2", "sub1" and "sub2" are deemed sub-pages for "MainPage" and "MainPage/sub1".
Note that sub-pages are a virtual thing. As a media-wiki site has no real folder structures, other than its defined namespaces.
Intended to be used at the top of a page.
Syntax
{{SubPage BackLink}} -- Drops back one level (if possible).
{{SubPage_BackLink|2..n}} -- Drops back two or more levels (if possible).
Example
See What links here for active used cases.
Optional general use
For linking back to a paren-page that's not part of a "MainPage / sub1 / sub2" style relation. The "page=" parameter can be used.
Like: {{SubPage_BackLink|page=<Target Pagename>}}