Unless I'm mistaken the only way for the Panelizer Defaults select list to appear on a node edit form is for the "administer panelizer" permission to be selected -- which is the broadest permission possible and allows the content editor to do everything on every content type.
It seems like an obvious use-case for the Panelizer Defaults is to allow a content editor to select one of a few pre-created layouts, not to go to the Panelizer page and modify Settings, Context, Layout or Content or even to use the IPE.
I would love to allow my content editors to switch layouts without being able to see all the confusing parts of Panelizer or to have a Panelizer tab on the node form.
thanks!
Comments
Comment #1
merlinofchaos commentedI believe you want this permission:
Access to it is controlled like this:
That panelizer_access checks the master administer as well as the 'choice' one I linked above.
Comment #2
damienmckenna@tchopshop: merlinofchaos' slightly verbose message means that this is already possible, there's a permission that will show once the feature is enabled that will be named named "[entity-type] [bundle]: Choice panels", e.g. "node article: Choice panels". You have to enable the "choice" option for the specific entity/bundle and then go to the admin/people/permissions page in order for the permission to show up.
Comment #3
tchopshop commentedAh thank you so much, I was wondering if this was a patch or a module -- I was waiting on someone more technical to decipher it for me!
Comment #4
tchopshop commentedI'm sorry... I spoke too soon. Maybe I'm still not understanding. I actually do have "allow panel choice" checked on the node edit page.
However, I'm not seeing a new permission. For each content type/bundle I only see:
I would have assumed the first one "Administer Panelizer default panels, allowed content and settings" would work to show the default panels, but it's not showing up with that permission, only with the overall panelizer permission.
Comment #5
grndlvl commentedI think that maybe this was not updated when view modes support was added?
Here is my first crack at it to allow for $settings['view modes']['choice']. We may need to support the $settings['choice'] still as well?
Comment #6
merlinofchaos commentedOh good grief, I can't believe I missed that.
Thanks grndlvl, you're absolutely correct.
tchopshop, try this patch.
Comment #7
tchopshop commentedThank you so much! The defaults choice permission is showing up and the dropdown shows up on the node edit form.
Comment #8
briand44 commentedThe patch in #5 fixed this issue for me.
Comment #9
smurrayatwork commentedThe patch in #5 fixed this issue for myself as well. It should be noted though that the settings array will be overridden once the foreach loop finishes. Might be better to make a unique variable name there. Something like:
Comment #10
grndlvl commentedGood catch smurrayatwork.
Here it is again with the suggested change from #9.
Comment #11
sgurlt commented#10 Works greate for me, thanks for the patch!
Comment #12
damienmckenna+1.
Comment #13
damienmckennaComment #14
codycraven commentedAlso confirming the patch works.
Comment #15
damienmckennaI used my comaintainer Ace card and decided to commit this - excellent work, grndlvl!
Comment #16
tchopshop commentedThank you everyone!!!