After installing jstools and enabling collapsiblock, block collapse functionality is not enabled.

I walked thru the collapsiblock.js code in a debugger, and determined that blocks are expected to have the content wrapped with a div having the "content" class. So, changing block.tpl.php to include the following line makes this theme compatible with collapsiblock:

Old:

    <?php print $block->content; ?>

New:

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

This fixes the problem, at least in my tests. I don't know if there is a standard set of requirements for block.tpl.php output (I assume not.)

-Mike

Comments

mcurry’s picture

Title: block.tpl.php doesn't include <div class="content">...</div> » Collapsiblock Support

Changing issue title to be more useful, I hope. Please note that this is a feature request, I don't really consider this a bug.

Gurpartap Singh’s picture

Can you put in a patch?

Gurpartap Singh’s picture

Anyone with a patch/direct fix? If, please reopen. (closing in mass).

Gurpartap Singh’s picture

Status: Active » Closed (fixed)
mcurry’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new637 bytes

I've attached a patch. Please commit to CVS.

Gurpartap Singh’s picture

You should be able to commit to 'New Portal' theme. :-)

mcurry’s picture

Status: Needs review » Closed (fixed)

Checked in to CVS head.

mcurry’s picture

I've been unable to commit this to the DRUPAL-4-7 version, I get the following errors:

cvs -z9 commit -m "Patch per http://drupal.org/node/81456" -- block.tpl.php (in directory C:\devroot\cvs-drupal\contributions\themes\newsportal\)
cvs commit: sticky tag `DRUPAL-4-7' for file `block.tpl.php' is not a branch

This page describes the problem:
http://drupal.org/node/57516