Page MenuHomePhabricator

Automatic page renaming if page name is based on template fields, which change
Open, Needs TriagePublic


The Page Forms extension lets you automatically set the name of a page based on the values of one or more (actually zero or more) form fields - see here:

Unfortunately, after a page has already been created, the connection between these fields and its name can be broken. If one or more of these fields (i.e., template parameters) is changed, it may make sense for the page to be renamed as well, but right now that doesn't happen, at least not automatically.

It may be a possible to add a parser function to Page Forms that defines the page name formula for a page. If a page with such a formula is edited, the code can check whether the page's name still matches the formula - and if not, automatically rename the page accordingly.

If the parser function were called "#page_name_formula", a call to it might look like:

{{#page_name_formula:<Restaurant[Name]> in <Restaurant[City]> <unique number>}}

(This is the same syntax that Page Forms' current "page name=" value uses.)

It may make sense to have this parser function be called by the template instead - which for most cases would just mean moving the function from the <includeonly> section of the template to the <noinclude> section.

It may also potentially make sense to not have this in Page Forms - for instance, to create a new extension just for this parser function. This function doesn't actually do anything form-related. On the other hand, it would presumably almost always be used in conjunction with the "page name formula" in PF forms. So my inclination is to add it to PF.

Event Timeline

This task has been assigned to the same task owner for more than two years. Resetting task assignee due to inactivity, to decrease task cookie-licking and to get a slightly more realistic overview of plans. Please feel free to assign this task to yourself again if you still realistically work or plan to work on this task - it would be welcome!

For tips how to manage individual work in Phabricator (noisy notifications, lists of task, etc.), see for available options.
(For the records, two emails were sent to assignee addresses before resetting assignees. See T228575 for more info and for potential feedback. Thanks!)