Panelizer saves overriden panelized node displays separately when you override the default display. This can quickly get problematic. Manually adding a pane to all panelized nodes quickly stops beeing a viable option when there are 50+ overridden panelized nodes.

One possible option (That merlinofchaos suggests here #1869784: A philosophical question about Panelizer workflow) is to add mini-panels to the default display for that places where you want to be able to add/remove/modify the panes globally (for all the nodes that were created using that default display.) That solution works great in some use cases unfortunately not for us. I can think these problems with this solution:

  1. In short it doesn't work well with an agile workflow. You have to early on (before any content using the default is created, or atleast overridden) decide where we might sometime want to add pane(s) globally
  2. Adding panes in between existing panes would require a mini panel between the panes..
  3. You loose IPE functionality for the individual panes that are inside of the mini-panel

I think it would be useful for panelizer to provide actions to add panes programmatically to overridden panelizer nodes.

TL;DR

We needed to add panes to existing overridden panelizer nodes so I created a Panelizer Bulk Update sandbox project with helper functions that we use in update hooks to add panes to existing overridden panelize nodes.

Comments

merlinofchaos’s picture

This isn't a bug, nor is it really fixable in any meaningful way.

merlinofchaos’s picture

The big problem becomes...how? Propagating changes and merging them into user changes is really, really hard. It's relatively easy to talk about on a high level (I want to add this pane here and have all the panels actually get it) but difficult once you talk about specifics (Well on the master it goes between the Red ad pane and the Blue ad pane, but on 4 of these panels they moved the red ad pane to the other side bar. Where does it go on those panels?)

It's not something you can do without having a very good, forward-thinking strategy, and thus can't really tack onto an existing system. At some point you end up asking the software to try to read your mind.

merlinofchaos’s picture

Category: bug » feature
emattias’s picture

Providing actions to easily add panes to all the overrides in the beginning or end of regions is one way to approach this. Panelizer_bulk_update has functions that does this at time of writing. We will probably soon add the ability to add a pane in a certain position later.

Another approach might be to have "dynamic/global" regions that work pretty much like the mini-panel solution does. It would be nice to have "global" regions that doesn't break IPE. My thinking is that instead of storing that region seperately per overridden node that region is pulled from the default display so when the default is changed it will propagate to overridden nodes also.

merlinofchaos’s picture

You're assuming that the layout isn't changed.

emattias’s picture

No, in the helper function to add a pane it filters out by node type & layout. So it will only add to the overridden nodes whose displays are using the specified layout.

My thinking is you have to specify the used layout and region to add to when running the action.

merlinofchaos’s picture

I'd say you're welcome to try, but such a patch is complicated, very involved, has an extremely difficult UI, and will take probably weeks of developer time. It's not likely to end up on my TODO list.

RobDi’s picture

I've been working on a similar problem, we also need editors with no php knowledge to be able to apply bulk operations to content. I've worked on some significant changes to the Panelizer Bulk Update sandbox module.

  • Added a UI under panelizer menu
  • Addeed a mini panel using features to which editors can add the content they wish to bulk add to nodes (safer than running php to describe pane)
  • Added the ability to specify which location in the panel the pane should take (opposed to 0 or end)
  • Added ability to delete panes that lie in a specified position, or the last pane if empty

If I had more time I would like to be able to use the standard panels/panelizer add content method to specify which panes to add. Also, I have only a couple months of drupal/php/web development experience, so any feedback is appreciated.

idealdesigns’s picture

How to use Panelizer Bulk Update sandbox module?
is it safe?

idealdesigns’s picture

The patch does not apply ?

RobDi’s picture

Issue with line endings, running dos2unix on module before patching works temporarily but I'll look into a proper fix. Again, this is something new to me, so thanks for patience.

Edit: Actually, having looked at https://drupal.org/coding-standards#indenting seems as though the original files should have unix line endings anyway as opposed to DOS.

damienmckenna’s picture

Status: Active » Needs work

Needs work, though it may be just scrapped in favor of fixing the VBO integration (#2214221: Fix Views_Bulk_Operations (VBO) integration).