Jump to content

Add page with page-edit-lang-default disabled


AndZyk
 Share

Recommended Posts

Hello,

I have a user role "editor-english", which is not allowed to edit the default language "german" of a page. For this I have installed the "page-edit-lang-..."-permissions. This user role has the permission "page-edit-lang-default" disabled and "page-edit-lang-english" enabled.

My problem is, that I want this user role to be able to add new pages in the non-default language only. But since ProcessWire requires you to enter the page title in the default language on page creation, it is not possible to add a page for this user role, because it is not possible to enter a page title in the default language.

2064061344_Bildschirmfoto2021-08-30um14_29_13.png.56f60c4bdf96d2d1d270194d7c464579.png

I think the only way for me would be to set the page title in the default language with a hook before the page is added. Could somebody please tell me which hook that would be? I only tried "Pages::saveReady" so far. Or is there an other solution? ?

In my opinion this is an issue which reduces the use of this permission.

Regards, Andreas

Link to comment
Share on other sites

I think I will settle with the solution to set a "Name format for children" on the "Family" tab of the parent template.

This way I can skip the "add page" step and still keep my "page-edit-lang-english"-permission.

Additionally I hook into "Pages:saveReady" to set a nicer page name.

If anyone has a nicer solution, I would be happy to hear it. ?

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...