Template:Extract name
From Wikishire
Revision as of 17:49, 24 October 2019 by RB (Talk | contribs) (Created page with "<includeonly>{{#ifeq:{{#expr:{{#pos:{{{1}}}|]]}}-1}}|-1|{{{1}}}|{{#sub:{{#replace:{{#sub:{{{1}}}|2}}|]]|}}|0|{{#ifeq:{{#expr:{{#pos:{{{1}}}|{{!}}}}-2}}|-2|{{#replace:{{#sub:{{...")
Extract name is a templates not used on its own, but a suitable one may be used within another template in order, for example, to create categories from an infobox. Where a name is fed in, it may be given that could be a page name, it may be given as a plain name or a link, and if a link, the page name to which it links might not be the same as the name displayed. This template is intended to extract the page name.
So,
{{Extract name|Whitchurch, Hampshire}} | gives: | Whitchurch, Hampshire |
{{Extract name|[[Whitchurch, Hampshire]]}} | gives: | Whitchurch, Hampshire |
{{Extract name|[[Whitchurch, Hampshire|Whitchurch]]}} | gives: | Whitchurch, Hampshire |