Jump to content

Module: Page Edit Per User


ryan
 Share

Recommended Posts

  • 1 year later...

I'm new here and use PW since last week. I am excited about the ease of use.

Now I have the following problem: I use the module "Page Edit per User" of ryan in the PW version 3.0.42. Everything works as expected and how I want it.

Although in the permissions is set that no pages in the tree should be moved, the button "move" appears in the side tree. How can I prevent this?

Best regards, Thomas

Link to comment
Share on other sites

  • 3 years later...

@ryan I love this module, makes it super easy to allow users access to edit their own pages, thank you!

I can't find a way to allow users to publish/unpublish their pages....

I added these lines to the module

public function init() {
		$this->addHookAfter('Page::publishable', $this, 'hookPageEditable'); 		
	}

	/**
	 * Page::publishable hook
	 *
	 */
	public function hookPagePublishable($event) {
		if($event->return) return;
		$event->return = $this->onMyBranch($event->object);
	}

& bingo, an "unpublish" button appears & a user can unpublish thier page. However, if they do, they lose access to it (it disappears from the page tree) & only a superuser (site admin) and republish it.

Please can you help with this - page publish/unpublish would make this module just perfect!   

Many thanks ?

Link to comment
Share on other sites

I noted that you can't add an unpublished page to the list of pages a user can edit.

It results in error: "Unpublished page /en/members/test/ is not allowed in field "Pages user may edit". To allow unpublished pages, edit the “editable_pages” field and see the setting on the “Details” tab."

I'm not sure where to find this - or if it is applicable as Page Edit Per User is a hook in to the system.

 

  • Like 1
Link to comment
Share on other sites

2 hours ago, dab said:

I'm not sure where to find this

"editable_pages" is a Page Reference field that is created by this module. Go to that field's settings and on the "Details" tab there is a setting "Allow unpublished pages?" - tick that checkbox.

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