Closed (fixed)
Project:
Panels
Version:
8.x-4.x-dev
Component:
In-Place Editor (IPE)
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2017 at 16:58 UTC
Updated:
26 Dec 2017 at 17:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
damienmckennaThis mirrors hook_panels_ipe_blocks_alter().
Comment #3
tim.plunkettHm, so I envision that every different implementation of layouts will want a hook like this. But that would only make sense if you alter the definitions directly, not this meta version.
Also I could see adding a method to LayoutPluginManager that would be like
->getDefintionsForUseCase($use_case)(but a better name) where you would pass in "panels_ipe" and it would be passed along to an alter hook or event. (That should not block this IMO)Comment #4
damienmckennaComment #5
japerryComment #6
damienmckennaThis reindexes the blocks after they're altered, per #2767087.
Comment #7
dsnopekIt'd be really great if some of the context in which the IPE was being used was passed to this alter hook. Using even just the
PanelsDisplayVariantit's possible to learn a lot! For example, you can include some Panelizer specific code in your alter hook to see what content type is currently being edited.Comment #8
hideaway commentedPatch has a small error most likely due to copy-paste from similar issue :)
this:
should be:
Comment #9
damienmckenna*cleans his glasses again*
Thanks @hideaway.
Comment #10
damienmckennaTo tim.plunkett's point: #2858162: Allow each type of plugin to be filtered per display subsystem
Comment #11
damienmckennaTalking through this some more with tim.plunkett, is this still really needed? The layouts provided by core could be intentionally kept somewhat limited to make them usable universally, while people building custom layouts for their own sites or to bundle with their themes could just use a category name that mentions its intended use, e.g. "Full page; Columns: 2" for layouts intended for a full page which has two columns.
Comment #12
chris burge commented@DamienMcKenna - Would this cover a use case where a site builder writes 2 or 3 custom layouts and wants to restrict users to only those layouts?
Comment #13
damienmckenna@Chris Burge: Yes, that's the exact scenario I was working from.
Comment #14
hideaway commentedversion 4.1 reroll
Comment #16
chris burge commentedUpdating version to 8.x-4.x-dev
Comment #17
dsnopekPer my comment in #7, here's a new patch that also passes the
PanelsDisplayVariant. This could allow you to, for example, change the layouts differently for two particular Panelizer content types.These are the same changes as in #2886230: hook_panels_ipe_blocks_alter() should receive the PanelsDisplayVariant being editted for
hook_panels_ipe_blocks_alter()Comment #18
damienmckennaThanks for the improvement @dsnopek.
Lets do this thing and go home.
Comment #20
samuel.mortensonCommitted! The review in #3 was never really addressed but I feel like that could be a core issue about plugins in general.