Last modified: 2007-08-07 02:58:54 UTC
Currently {{BASEPAGENAME}} returns the parent page of the current page; it essentially acts like [[../]]. For example, using {{BASEPAGENAME}} on "Wikipedia:ExamplePage/Archive_1/Subpage" it returns "ExamplePage/Archive 1". The current behavior is misleading. I expect {{BASEPAGENAME}} to get the topmost name, not the immediate parent. When using {{BASEPAGENAME}} on "Wikipedia:ExamplePage/Archive_1/Subpage" I think it should return "ExamplePage". I propose modifying the current behavior of {{BASEPAGENAME}} (getBaseText() in Title.php) to return the topmost name, as I believe this was the original intent of bug 5845.
This was not the intended behaviour, and it doesn't make sense to give subpages any more special treatment than they already have, especially since they mean very little to MediaWiki as it is.
*** Bug 10136 has been marked as a duplicate of this bug. ***
Introduced TITLEPARTS parser function in r22711, to allow obtaining whatever number of segments of a page title the user desires.
can do work as below? {{#titleparts:Help:Link/a/b|-1}} gives b {{#titleparts:Help:Link/a/b|-2}} gives a/b {{#titleparts:Help:Link/a/b|-3}} gives Help:Link/a/b