Last modified: 2011-07-20 12:01:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14872, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12872 - Add variable to show the topmost level in the tree of subpages
Add variable to show the topmost level in the tree of subpages
Status: REOPENED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low enhancement with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 14026 23861 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-01 23:31 UTC by Misza
Modified: 2011-07-20 12:01 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Misza 2008-02-01 23:31:38 UTC
Please create an equivalent of {{BASEPAGENAME}} that cuts not only the last level of a page's name but all the way up to the "ground" level.

For example, on page [[User talk:Example/Archives/2008/January]]:
* {{BASEPAGENAME}} returns "Example/Archives/2008"
* proposed {{REALBASEPAGENAME}} (or whatever you name it) returns just "Example"

(Don't forget the URL-friendly {{REALBASEPAGENAMEE}}.)
Comment 1 Danny B. 2008-02-01 23:36:58 UTC
Suggesting {{ROOTPAGENAME}}.
Comment 2 Misza 2008-02-02 01:00:02 UTC
Implemented in r30413.
Comment 3 Danny B. 2008-02-04 20:43:03 UTC
Unfortunately reverted in r30547.
Comment 4 Misza 2008-02-04 20:56:02 UTC
A solution for wikis that have ParserFunctions extension installed is to use {{#titleparts:{{PAGENAME}}|1}}.
Comment 5 Roan Kattouw 2008-05-07 20:26:31 UTC
*** Bug 14026 has been marked as a duplicate of this bug. ***
Comment 6 Peter van Londen 2008-05-07 20:47:59 UTC
Thanks for that solution with titleparts: that works. I have added this to http://meta.wikimedia.org/wiki/Help:Link/a/b
Comment 7 Lady Aleena 2008-08-04 00:01:04 UTC
{{ROOTPAGENAME}} would be great! Please?
Comment 8 Brion Vibber 2008-08-04 21:20:09 UTC
Is a {{ROOTPAGENAME}} still necessary if #titleparts does this?
Comment 9 Sam Reed (reedy) 2008-08-04 21:25:07 UTC
Would be easier to remember {{ROOTPAGENAME}}...
Comment 10 Brion Vibber 2008-08-04 21:34:35 UTC
Ok, how about we restore r30413 but without the extra PARENTPAGENAME alias?
Comment 11 Misza 2008-08-05 22:25:52 UTC
How about we add ParserFunctions to core? ;)
Comment 12 Sam Reed (reedy) 2009-01-01 22:41:17 UTC
Any chance of getting this one done? ;P

Seeing as its quite easy
Comment 13 Lady Aleena 2009-02-23 06:26:49 UTC
You mean that this still hasn't been added yet? :O

There is a template on Wikipedia that could use {{ROOTPAGENAME}}, so please do this.
Comment 14 Niklas Laxström 2009-02-23 09:50:47 UTC
Titleparts has been available for how long now, what is the problem?
Comment 15 Sam Reed (reedy) 2009-02-23 16:05:25 UTC
I suspect the bug being open/people not knowing about it...

For peoples info...

http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#.23titleparts:


So, its whether people accept that as a solution (fine if the wiki has parser functions), or if something should still go in core...
Comment 16 JuneHyeon Bae (devunt) 2010-06-09 14:23:48 UTC
*** Bug 23861 has been marked as a duplicate of this bug. ***
Comment 17 Helder 2011-07-20 12:00:12 UTC
See also:
* [[Extension:BookManager#Variables]]
** {{ROOTPAGENAME}}
** {{ROOTPAGENAMEE}}
* [[Template:ROOTPAGENAME]]
Comment 18 Helder 2011-07-20 12:01:24 UTC
(In reply to comment #17)
> * [[Extension:BookManager#Variables]]
Uops... I mean [[mw:Extension:BookManager#Variables]].

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links