By rcombes on
Hi all,
I've tried searching for an answer for this but have had no luck.
I've created a two column mini-panel in Drupal 6.13 with 1 node on the left and 2 nodes on the right. Each node has rounded corners set as its style. When I view the result on the home page there appears a separator line between the two nodes/boxes in the right column. When I inspect this separator, I see that it's a
defined in the /sites/default/files/ctools/css/9bcb6bfb6d660e5b46ae2b6c9fc5c1b5.css file which of course I can't really edit.
I've looked everywhere in the mini-panels and panels admin pages but can't find anything related to the separator or how to hide it.
Any ideas on how to get rid of this panel separator?
Thanks
Roland Combes
Comments
Re: How do you remove the separator between panels?
There are quite a few ways of doing this. The easiest will be to use CSS. Add a custom CSS rule to neutralize the "panel-separator" CSS rule. For a mini panel called "test_mini_panel", the CSS identifier name is "#mini-panel-test_mini_panel .panel-separator" (According to Firebug).
Alternatively you can override theme_panels_default_style_render_panel(), but then it'll effect all the panels and hence is NOT highly recommended.
The best option is to write a custom Panels style plugin. See http://drupal.org/node/427192. It's pretty simple and I have one working locally. The code looks like this:
<?php
// $Id: default.inc,v 1.1.2.2 2009/03/24 18:32:20 merlinofchaos Exp $
/**
* @file styles/block.inc
* Definition of the 'tefault' panel style.
*/
// ---------------------------------------------------------------------------
// Panels hooks.
/**
* Implementation of hook_panels_style_info().
*/
function panels_tefault_panels_styles() {
return array(
'tefault' => array(
'title' => t('TNo style'),
'description' => t('The default panel rendering style; displays each pane with a separator.'),
'render panel' => 'panels_tefault_style_render_panel',
),
);
}
// ---------------------------------------------------------------------------
// Panels style plugin callbacks.
/**
* Render callback.
*
* @ingroup themeable
*/
function theme_panels_tefault_style_render_panel($display, $panel_id, $panes, $settings) {
$output = '';
foreach ($panes as $pane_id => $content) {
$output .= panels_render_pane($content, $display->content[$pane_id], $display);
}
return $output;
}
====================
Drop it inside panels/plugins/styles/ and name it tefault.inc and then clear cache (e.g. by visiting admin/build/modules). Then select the "TNo style" as "Display style" for the mini panel's "Display settings". Ideally you'll make this code part of your own custom module though for which you'll have to implement hook_ctools_plugin_directories().
Excellent! I tried the
Excellent! I tried the simple way for now of adding the style definition as follows to the style.css for the theme in question
Since the panel has a specific id (mini-panel-visitor_panel_page_row_2), this only negates the separator for this particular case, which is exactly what I need. I know I'll have to add another line in the css every time I add a different panel but for now this solves the problem.
I'll try the more in-depth method later and see if I can follow it.
Thanks
Roland Combes
The line:<?php$output .=
The line:
in your code sample didn't work for me (nothing returned). But this did:
In your template.phpfunction
In your template.php, just add the following function :
Worked for me. Thanks @skorp
Worked for me. Thanks @skorp
Works
Indeed—thanks @skorp. Cheers!
You can also choose the
You can also choose the "style" setting on the region and choose "No markup at all".
You still get a region wrapper, but the panes are not concatenated with the separator, so the result is the same as the theme patches suggested here. You just have to choose it per region.
.dan. is the New Zealand Drupal Developer working on Government Web Standards
It is work for me. Thanks
It is work for me. Thanks
This worked for me too.
I think this is the right solution to remove the Panel separator. This solution worked for me easily without having to get my hands dirty by editing the code.