collapsible blocks don't collapse if using panels

bsarchive - June 12, 2008 - 09:53
Project:Javascript Tools
Version:5.x-1.2
Component:Collapsiblock
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

I've been collapsiblock to great effect up till now. I've just started deploying Panels module page layouts and this seems to cancel out the collapsible block behaviours. Is there a way of reinstating them?

If I have a tabbed block containing blocks which are collapsible, however, the nested blocks (on the tabs) are still collapsible, although the nesting, main, block is not.

Can anyone help?
Thanks,
bsarchive

#1

nedjo - June 19, 2008 - 18:31

Haven't seen this issue in action, don't have any wisdom to offer. I'd welcome insight or a patch.

#2

rick.archibald - July 25, 2008 - 23:37

Subscribing. I just started deploying Panels2 as well, and the collapsiblocks are no longer collapsible.

#3

rentex - July 27, 2008 - 08:26

Subscribing. I also use Panels 2.

#4

rick.archibald - January 31, 2009 - 02:58

Subscribing.

#5

lelizondob - February 14, 2009 - 12:15
Version:5.x-1.1» 5.x-1.2

I use Panels 2, Jquery_update 2 and I don't have a problem with this. The only thing I had to do is create an .inc file inside jstools/collapsiblock/theme to set the collapsiblock_theme_data function.

Maybe this post it's too old and it should be closed

#6

SocialNicheGuru - February 22, 2009 - 23:33

No I am having the same problem. Lelizondob, can you give instructions on how you solved it in the form of step 1, 2, 3.

Thanks Chris

#7

lelizondob - February 22, 2009 - 23:54

Make sure you have the latest jquery_update modules installed first, that means you'll need version 2.x.

Then go to the jstools/collapsiblock directory, probabbly something like /sites/all/modules/jstools/collapsiblock

There you'll see a 'theme' folder, inside you'll have some files, you'll have to create a new one, my theme is 'darkblue' so my file is darkblue.inc, inside I have this code:

<?php
function collapsiblock_theme_data() {
  return array(
    'titleSelector' => 'h3',
  );
}

you'll have to go to block.tpl.php in your theme directory to see if you're actually using that title selector in your blocks title, my block.tpl.php looks like this:

<div id="block-<?php print $block->module .'-'. $block->delta; ?>" class="clear-block block-<?php print $block->module ?> block">


  <?php if ($block->subject): ?>

    <h3><?php print $block->subject ?></h3>

  <?php endif;?>


  <div class="content"><?php print $block->content ?></div>

</div>

See if the blocks collapse now outside a panel. if it works make sure you select the option "System Block" (something like that, don't have it in front of me right now) when you add new content to a panel.

One more comment, I tried to override the theme funcion in template.php this way I wouldn't have to create a new mytheme.inc file, but that didn't work. If you ever update jstools you'll probabbly will have to backup your mytheme.inc first so don't forget.

 
 

Drupal is a registered trademark of Dries Buytaert.