Page MenuHomePhabricator

Add checkbox to [[Special:PrefixIndex]] to hide the given prefix in the list items
Closed, ResolvedPublic

Description

When we want to access the full list of subpages of a given page we usually use [[Special:PrefixIndex]] ([1], [2], [3], [4]), but currently it always displays the fulltitle of the pages, which can make the list harder to understand. This is particularlly true when dealing with pages which are mostly structured as subpages of some other page, as currently happens on Wikibooks projects ([3], [4]), since we don't have a proper way to define what is "a book" (T17071)

It would be interesting to add a new field to the current form:

-- All pages---------------------------------------
| "Display pages with prefix: [_______________]   |
|                  Namespace: [___________] [GO]  |
|                                                 |
---------------------------------------------------

like this:

-- All pages---------------------------------------
|  Display pages with prefix: [_______________]   |
| Format titles hiding prefix [_______________]   | <-- New field -->
|                  Namespace: [___________] [GO]  |
|                                                 |
---------------------------------------------------

The content of the second field could be (by default) equals to that o the first field when the special page is acessed from a link like
[[Special:PrefixIndex/Test]]

One option would be to add a link which could call a jQuery function like this:

$('#mw-prefixindex-list-table td a').each(function(index) {
	$(this).text( $(this).text().replace($('#nsfrom').attr('value'), '') )
});

Compare the default list from for "Wikipedia:WikiProject Australia/"[5] with the list displayed after that JavaScript is executed.

[1] Special:PrefixIndex/Wikipedia Signpost/2010
[2] http://www.mediawiki.org/wiki/Special:PrefixIndex/Meetings/Test_framework/
[3] b:Special:PrefixIndex/High_School_Mathematics_Extensions/
[4] b:pt:Special:PrefixIndex/Livro de receitas
[5] http://en.wikipedia.org/w/index.php?title=Special:PrefixIndex&prefix=WikiProject+Australia/&namespace=4


Version: unspecified
Severity: enhancement

Details

Reference
bz27131

Event Timeline

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

An interesting usecase would be the ability to trigger it when transcluding {{special:prefixindex/foo}} (but I'm not sure how to go about doing that, since the normal way of passing parameters via subpages is already in use)

(In reply to comment #1)

An interesting usecase would be the ability to trigger it when transcluding
{{special:prefixindex/foo}} (but I'm not sure how to go about doing that, since
the normal way of passing parameters via subpages is already in use)

Yep! I created this bug after noticed that a page was using this {{special:prefixindex/foo}} trick.

I'm not sure either about how to use the feature on pages transcluding the special page. But at least in the page itself it should be easier to implement...

Umherirrender claimed this task.

Fixed by I96a0a08ea11a82016eb382abbeb2d54bfc2c4016 - https://gerrit.wikimedia.org/r/#/c/71911/

He7d3r set Security to None.