Lars282 Posted May 17, 2015 Share Posted May 17, 2015 How can I enable to name format for children option when allowing multiple templates for children? In other words, where is it best to hook into? I am already hooking before setupPageName to derive my custom page names: addHookBefore('Pages::setupPageName', $this, 'deriveCustomPageName') But there is something before that is responsible for "jumping" the name entry screen. I found processQuickAdd in the ProcessPageAdd module, but it is called from the ___execute() function - so I can't see how to easily change the conditions on when it shall be called without having a module more or less replace the entire core ProcessPageAdd module, which seems over the top ... Thanks a lot! Link to comment Share on other sites More sharing options...
kixe Posted December 15, 2015 Share Posted December 15, 2015 Go here: https://processwire.com/talk/topic/8576-name-format-children/?p=108748 1 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted December 15, 2015 Share Posted December 15, 2015 @kixe: Why did this module not make it to the module directory? 1 Link to comment Share on other sites More sharing options...
kixe Posted December 15, 2015 Share Posted December 15, 2015 I made it today. I would like to see it in core. If it will not find the way in the core I will load it up to the modules directory. 1 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted December 16, 2015 Share Posted December 16, 2015 Sure! I agree this type of thing should be in the core. Did you make an issue or a pull request on github? I think this way we will have more chance. 2 Link to comment Share on other sites More sharing options...
kixe Posted December 16, 2015 Share Posted December 16, 2015 I am thinking about resp. working on a version which allows multiple values too, something like Setting: date(Y), parent.name, id Result: /myparent/2015-myparent-5067/ This is a bit tricky since some values are provided in the moment when page will be created, some after. I'll keep you informed about how it is going on. If it is working well I will do the PR. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now