collapsible blocks don't collapse if using panels
bsarchive - June 12, 2008 - 09:20
| Project: | Javascript Tools |
| Version: | 5.x-1.x-dev |
| Component: | Collapsiblock |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi,
I've been using the jstools collapsiblock module to allow users to collapse blocks -- it's great. I've recently started deploying Panel page layouts and all my blocks have now lost their collapsible behaviours, at least when they're in a Panels pane. Is there a way of reinstating the behaviour, or, perhaps better, having a setting within the panel pane that a block is collapsible and what its default state should be?
Many thanks in anticipation!
Bsarchive.

#1
I've found the same issue using 5.X-1.2 version.
Any suggestion on how to reimplement a correct behaviour in panels ?
#2
I think this could be the same reason why block theme doesnt work. Panels 2 doesnt render blocks in panels as blocks anymore. Try adding this to your template.php
function phptemplate_panels_pane($content, $pane, $display) {
if (!empty($content->title)) { $content->subject = $content->title; }
return theme('block', $content);
}
#3
The suggestion in #2 is unlikely to work.
I suspect that the basic problem here is that the markup collapsiblock is depending on for its js to work isn't being properly added to the blocks when they're rendered through Panels (duh, kinda obvious now that I've written it). If that's the case, though, then the solution lies in panels' layout/style plugins. Either a) we need to revise some of the default plugins so that they're more friendly with the standard block rendering method, or b) collapsiblock could implement a panels style that makes the blocks render as they need to for collapsiblock to be able to use them.
I think that the latter option is more likely to yield good results (especially in the short term), so I'm kicking this over to the jstools queue. Nedjo, if you're interested/have time to do this, I'd be happy to chat with you about what writing such plugins would entail.
#4
+1