Disable "default" pane styles?

overtune's picture


Is there any way to disable the default pane styles that comes with panels ("System block", "No markup at all", "No style", "Rounded corners")?

If there is no way, how can I change de default option? Eg, if I want all new panes to use the "No markup at all" style?

Big thanks!


Active Feature Request

jason.bell's picture

This question has been asked in the CTools issue queue (http://drupal.org/node/476616) and the Panels issue queue (http://drupal.org/node/1257294).

A feature request was added here: http://drupal.org/node/874002.

Ah, thanks! Been searching

overtune's picture

Ah, thanks!
Been searching all afternoon without finding any information...

How I manage to do it

Chayemor's picture

I posted my bit of help on how I manage to do it in the following issue queue (comment #30):


Alters the form provided by the module PANELS and STYLIZER so that the default value
of a NEWLY created panel is always the theme's custom values located admin/config/content/classy_panel_styles
function MyModuleNameOfCourse_form_alter(&$form, &$form_state, $form_id) {
$panels_add_content_forms = array('panels_edit_style_type_form');
if (in_array($form_id, $panels_add_content_forms)) {
$panel_id = explode("/", $form['#action']);
$panel_id = $panel_id[ count($panel_id) - 1 ];
// When a panel is just created/added its id is actually new-[a-z0-9]-

// after it's saved it adopts the node's id
preg_match('/^new-[0-9a-z-][0-9a-z]$/', $panel_id, $panel_is_new);
if( count($panel_is_new) > 0 )
$form["style"]['#default_value'] = "classy_panel_styles:cps_default";

Another way of achieving the same result by inspecting the node's display and style information. If there is no style set
then the panel with that node was just created.
if( array_key_exists($panel_id, $form_state["display"]->content) ){
$target_panel = $form_state["display"]->content[$panel_id]->style;
if( !array_key_exists('style', $target_panel) )
$form["style"]['#default_value'] = "classy_panel_styles:cps_default";