We want to be able to make only a few regions "IPE enabled". We managed to do this by using our own intermediate pipeline that overrides render_region and render_pane methods and runs the panels_renderer_standard or panels_renderer_ipe equivalent depending on if we want it to be IPE enabled or not.

It works great except that we don't have a way to configure if we want the region to be IPE enabled or not. I'm thinking that copying the locking functionality of panes to regions would be the way to go. I might do a patch for that. If that is a bad idea, please let me know..

Comments

emattias’s picture

Status: Needs work » Active
merlinofchaos’s picture

Panels already supports locking regions. Do you need more than it currently allows?

Letharion’s picture

Status: Active » Postponed (maintainer needs more info)
emattias’s picture

Status: Postponed (maintainer needs more info) » Needs work

What do you mean by locking regions? Is it possible to do this(and if so, could you please hint to how):

When an editor clicks "Customize page":

  • Only the non-locked regions get the IPE toolbar at the top of the region.
  • You can only add or move content into the non-lock regions.
  • The locked regions appear exactly the same in "Customize page" mode as the standard renderer outputs it.

My thinking is to have a "Locking" dropdown header when you press the cogwheel for the region. Like you have for the cogwheel menu for panes.

emattias’s picture

Status: Needs work » Active
emattias’s picture

Panels already supports locking regions. Do you need more than it currently allows?

Do you mean locking panes in a region? Because that's not what we need.

We need to be able to lock the region from IPE completly. So on the same panel when you press "Customize page", some regions get the IPE toolbar and you can add/remove/re-order panes and other regions render like they did before pressing "Customize page". So the locked regions look and behave like they aren't "IPE enabled".

Semantic/UX question: Should it be called that you "lock" the region or that you select the renderer for that region? (Like you select style, etc.)

emattias’s picture

We don't have time to create a patch for this atm, so I created a Panels Selective IPE Sandbox that provides a new pipeline which will only "IPE Enable" specified regions (which can be set through a db variable).

It's has no extra ui that is talked about in this issue, but it does make it possible to have only part of the page be IPE editable.

emattias’s picture

Issue summary: View changes

Clarify

PieterDC’s picture

Thanks for the example code in your sandbox, emattias.
I was looking for this and I'm going to implement it in my own renderer.

netsensei’s picture

This looks great.

I've been looking at a similar issue recently: https://drupal.org/sandbox/netsensei/2152563

The take away here is that IPE access can't be controlled on a granular level atm. It's all or nothing. Trying to solve this isn't going to be easy since you'll look at catering a lot of use cases. i.e. access on a region and/or panel level based on role, taxonomy access, organic group, etc. It's basically a pandora's box.

First thought on how to approach it: hook IPE access checks up with the plugin API. That would make it a lot easier to implement your own plugins and hook up with other access type systems.

Either we patch IPE display renderer to do this or we create a 3rd party module based on ematthias' work.

PI_Ron’s picture

Issue summary: View changes

There is a real need for more granular IPE permissions. The IPE is a fantastic interface but giving a site manager access to change every pane on a page through the IPE is not always a good option. It would be great to be able to change role permissions for an individual pane such as 'Move', 'Edit', 'Change Style'.

Has anyone found a solution for more granular IPE permissions?

joel_osc’s picture

Checkout : https://www.drupal.org/sandbox/emattias/1904450... awesome little module I have running on a few live sites now.

PI_Ron’s picture

Thanks @joel_osc, there is also this patch which I've just redone that can globally turn off add/remove/settings/styles buttons per role for the IPE:

https://www.drupal.org/node/1699432#comment-9502413

aleksijohansson’s picture

There is a real need for more granular IPE permissions.

I second this!

kenorb’s picture