<noinclude>
This template converts an internal wiki link from

<pre>
[[My page/My subpage]]
</pre>

or

<pre>
[[My page/My subpage|My page/My subpage]]
</pre>

to

<pre>
[[My page/My subpage|My subpage]]
</pre>

(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 [https://www.semantic-mediawiki.org/wiki/Help:Inline_queries ask queries] of [https://www.semantic-mediawiki.org Semantic Mediawiki], which can use templates to format result (see the documentation [https://www.semantic-mediawiki.org/wiki/Help:Using_templates here])

It has also been inspired by the solution of Dave which can be found [https://sourceforge.net/p/semediawiki/mailman/semediawiki-user/?viewmonth=202107 here] (search for "Template:Path_Stripper")

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


</noinclude>
{{#invoke:Path_stripper|main}}