Jump to content

disabling name during new page creation


valan
 Share

Recommended Posts

When PW admin user creates new page it gets "first screen" with title, name and template fields.

For better usability, for specific templates I need to skip this "first screen" and let user directly enter page editing. As I see it:

(1) template should be selected automatically based on parent page template "allowed children template(s)". Only if there could be several templates, then user should be advised with "first screen" and the only one "select template" field on it.

(2) unique "name" field should be assigned automatically on page save. Page should not be saved before editing as it happens now after "first screen", only after editing/saving.

"Title" field is not global in my setup.

I guess the answer is to "use hooks", but I need some help to understand which functions to hook and how to check/supply template in (1) and manage saving-in-the-end in (2).

Thanks!

Link to comment
Share on other sites

Soma, thanks! Looks informative enough to solve (1). As for (2) - I think that it is not good to compromise interface usability in favour of some fields requirements (even Page field ))). I'd rather suggest to handle such situations in these fields. But as far as I understand, solution may require some core modules re-thinking, so leaving it for Ryan consideration.

Link to comment
Share on other sites

As far as I see it's only image/file and maybe page fields that need a page to be existent for custom php code in the settings. If you only use text fields it would be possible what you want. Otherwise you could still create a page with a unique name and redirect to the page edit screen for editing. Something like Pete was doing that was linked to in the thread I linked to.

  • Like 1
Link to comment
Share on other sites

Thanks Soma! Pete did exactly what I want. But I'd stay with the suggestion that "generate children page unique name and jump directly to edit with template X" should be embedded into admin interface for any template. As I see it - it is too common task to be left for developers only. )) Thanks!

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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