Jump to content

Recommended Posts

Posted

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!

  • 6 months later...
Posted

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.

  • Like 1
Posted

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.

  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...