additional theme parameters
| Project: | Collapsiblock |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Firstly this is an awesome module, one of the best that i have come across.
I have a use case where i am using a theme that is generated from Aristeer, and none of the block content is collapsible using collapsiblock. The reason for this is that the CSS is different, where the blocks appear wrapped in div.Block, rather than div.block, and the content is wrapped in div.BlockContent rather than div.content.
I propose a small amendment to this module to include 2 new parameters blockSelector and contentSelector, which will allow collapsiblock to work with this theme and many other 'non standard' themes. These parameters are optional and if not present the module works as now by looking for div.block and div.content.
I have a working modified version of collapsiblock that i am using on my live site. I am happy to pass this on to the community.
function collapsiblock_theme_data() {
return array(
'titleSelector' => 'div.t',
'blockSelector' => 'div.Block',
'contentSelector' => 'div.BlockContent',
);
}
On another note, collapsiblock has disappeared from the module list on drupal, and on this project page does not have a recommended download. Can someone explain this? Is this module/functionality being included in drupal core or elsewhere?
many regards
Peter

#1
I echo rodenp's endorsement of the module and I too had this same problem with an Artisteer theme and made identical changes to collapsiblock_theme_data() with corresponding changes to collapsiblock.js
I have attached patch files for collapsiblock.js and garland.inc
I hope I have followed the correct protocol and created patch files correctly - I am new to this.
Regards,
Bob
#2
#3
I'm using the wilderness theme which seems to be an Artisteer theme. I tested the patch and it does seem to work except for:
When I collapse one block, it collapses just that block. When I click on a like... all blocks take on the state that of the last block I clicked (so collepsed in this example).
They seem to completely ignore there settings and just go off of the last block that I modified.
It doesnt look like this would be a problem w/ this patch and may be a problem w/ the module.