Path stripper

From Wikisphere
Jump to navigation Jump to search

This template converts an internal wiki link from

[[My page/My subpage]]


[[My page/My subpage|My page/My subpage]]


[[My page/My subpage|My subpage]]

(that is it will show only the latest node of the path keeping the link intact)

The template has been conceived to be used within ask queries of Semantic Mediawiki, which can use templates to format result (see the documentation here)

It has also been inspired by the solution of Dave which can be found here (search for "Template:Path_Stripper")

***Attention, this template can be superseded using the Mediawiki's hooks HtmlPageLinkRendererBegin and SelfLinkBegin (see Wikisphere_PageProperties extension)