Template:Basepagename top
From Wiki
Similar to {{BASEPAGENAME}} but returns the topmost page, not just the superpage. Also it works in all namespaces, not only those with subpages enabled. It splits on the slash character (/).
Instead of this, you can usually use {{#titleparts:{{PAGENAME}}|1}}.
Usage
Wikitext | Result |
---|---|
{{basepagename top|Talk:Foo/bar/baz}} | Foo |
{{basepagename top}} | Foo (assuming page is Talk:Foo/bar/baz |