Page MenuHomePhabricator

Create a page name identification string (i.e. $pagename$) for use in "Replace special"
Closed, ResolvedPublic

Description

So far, I've been crossing my fingers and relying on the robustness of my regex to grab the page name from text. If bold quotes (''') don't exist around it at the beginning of a line, there is a problem. Sometimes, though rarely, even if they exist, there is a problem. The best examples I can give are the plethora of minor planet (asteroid) pages, which sometimes use the {{mp}} template within bold quotes, sometimes not, sometimes for the entire name, sometimes only in part. This creates a very long, complicated search pattern that has to account for many, many exceptions.

Grabbing a page's name shouldn't be this complicated, nor ambiguous; it should be easy.

Event Timeline

Tom.Reding updated the task description. (Show Details)
Tom.Reding raised the priority of this task from to High.
Rjwilmsi changed the task status from Open to Stalled.Jan 19 2016, 12:10 PM
Rjwilmsi added a subscriber: Rjwilmsi.

@Tom.Reding to confirm if %%pagename%% covers it

It does! I didn't know about that, thank you!

Magioladitis closed this task as Resolved.Jan 19 2016, 3:22 PM
Magioladitis set Security to None.
Josve05a changed the task status from Resolved to Invalid.Jan 19 2016, 10:22 PM
Josve05a claimed this task.
Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptJan 19 2016, 10:22 PM

I see that this indeed works in the Find field. It does not work in the "Replace with" field, though, inserting "%%pagename%%" literally into the text. Can this be made to work in "Replace with" as well?

%%title%%, %%fullpagename%%, %%subpagename%%, %%basepagename%% all do not work either. Is this intentional or a bug?

Rjwilmsi changed the task status from Invalid to Resolved.Jan 20 2016, 2:11 PM

rev 11810 For T123925 ApplyKeyWords to In template rule "replace with"