Hello,

I typically use panelizer with the configuration of "With Default, With Choice" on most of my bundles (IPE enabled). I noticed, however, that when editing with the IPE, the "Save as Default" button uses the bundle name (i.e. "Save as @bundle_type default"). It seems to me that if the "Choice" option is enabled, this text should actually read something like "Save as @panel_title default". For example if I'm on a node with a few different default panel options (for sake of argument let's say the choices are "Default", "Landing Page", "Front Page") and the "Front Page" default is chosen, the IPE button would read "Save as Front Page default".

Attached is a patch that does just this. The only weirdness I've noticed is that in the case of the panel having the name "Default", the button reads as "Save as Default Default" which is a bit ugly... But I wasn't sure if we should check for this (which might be tricky to handle for multilingual sites) or just let people come up with better names than "Default" for their default Panels...

Anyway, thanks for your time!
drclaw

Comments

drclaw’s picture

Oops, my bad, I forgot to concatenate the $view_mode on the $bundle before checking it with $handler->has_panel_choice() - Updated patch attached.

drclaw’s picture

Slightly related is this issue #2315851: "Save as default" button in IPE saves both the selected panel, and the 'default' panel as the same display. If this button text gets updated and that issue isn't resolved, it could lead do some extra confusion.