Page MenuHomePhabricator

Variable giving only the pagename minus subpagename
Closed, ResolvedPublic

Description

Author: stanley

Description:
Ex: Wikipedia:Today's featured article/May 12, 2006

{{FULLPAGENAME}} = Wikipedia:Today's featured article/May 12, 2006
{{NAMESPACE}} = Wikipedia
{{SUBPAGENAME}} = May 12, 2006
{{PAGENAME}} = Today's featured article/May 12, 2006

But there is no way to get the "Today's featured article". Please provide
variable giving this pagename minus subpagename.


Version: 1.7.x
Severity: enhancement

Details

Reference
bz5845

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:13 PM
bzimport set Reference to bz5845.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

For what purpose? Won't [[../]] et al. work for linking?

stanley wrote:

According to example above, [[../]] returns Wikipedia:Today's featured article
with inline link. The objective is to get the title "Today's featured article".

Some application for this is for navigational template such as:
Previous article: [[{{NAMESPACE}}:{{PAGENAMEONLY}}/{{CURRENTMONTHNAME}}
{{#expr:{{CURRENTDAY}}-1}}, {{CURRENTYEAR}}]]
Next article: [[{{NAMESPACE}}:{{PAGENAMEONLY}}/{{CURRENTMONTHNAME}}
{{#expr:{{CURRENTDAY}}+1}}, {{CURRENTYEAR}}]]

robchur wrote:

Added BASEPAGENAME and BASEPAGENAMEE magic words in SVN trunk, r14212.

conrad.dunkerson wrote:

Using {{BASEPAGENAME}} on the en-wikip 'Main Page/Tomorrow' page returns "Main
Page/Tomorrow" instead of just "Main Page" as expected.

rotemliss wrote:

enwiki doesn't have subpages enabled in the main namespace.