Collapsiblock Support

inactivist - August 30, 2006 - 08:35
Project:News Portal
Version:HEAD
Component:Code
Category:feature request
Priority:minor
Assigned:Unassigned
Status:closed
Description

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

#1

inactivist - August 30, 2006 - 15:59
Title:block.tpl.php doesn't include ...» 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.

#2

Gurpartap Singh - November 25, 2006 - 11:33

Can you put in a patch?

#3

Gurpartap Singh - November 25, 2006 - 11:54

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

#4

Gurpartap Singh - November 25, 2006 - 11:55
Status:active» closed

#5

inactivist - November 25, 2006 - 16:13
Status:closed» patch (code needs review)

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

AttachmentSize
newsportal-block.tpl.php-collapisiblock-patch.txt637 bytes

#6

Gurpartap Singh - November 25, 2006 - 19:52

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

#7

inactivist - November 27, 2006 - 07:01
Version:4.7.x-1.x-dev» HEAD
Status:patch (code needs review)» closed

Checked in to CVS head.

#8

inactivist - November 27, 2006 - 07:23

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

 
 

Drupal is a registered trademark of Dries Buytaert.