In certain blocks the content is not wrapped in a <div class="content">.

For this reason collapsiblock does not work with the Zen theme 5.1. Zen has a block.tpl.php that does not wrap the <?php print $content; ?> in an extra div and it is this div that is hidden or shown by Collapsiblock.

For Zen you can solve it with adding the block.tpl.php to your theme and add the wrapper:

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

Comments

Demoshane’s picture

Can confirm this. Won't work with adaptive theme either.

jcsnyder’s picture

I am struggling with this as well. Thanks.

mvc’s picture

Component: Code » Documentation

When using themes like Zen 7.x-5.x you will either need to modify block.tpl.php (or its derivatives) as shown above or change the collapsiblock selectors at admin/appearance/settings. If certain base themes are going to make it hard to figure out where the block content is located, that's not this module's fault. I suggest mentionning this briefly in README.txt.

mvc’s picture

Version: 7.x-1.0 » 7.x-1.x-dev

forgot to update version

VBN’s picture

Issue summary: View changes

Actually, on Zen theme 7.x-5.5 you need to change this

Change:

<div id="<?php print $block_html_id; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>

  <?php print render($title_prefix); ?>
  <?php if ($title): ?>
    <h2<?php print $title_attributes; ?>><?php print $title; ?></h2>
  <?php endif; ?>
  <?php print render($title_suffix); ?>

  <?php print $content; ?>

</div>

Into:

<div id="<?php print $block_html_id; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>

  <?php print render($title_prefix); ?>
  <?php if ($title): ?>
    <h2<?php print $title_attributes; ?>><?php print $title; ?></h2>
  <?php endif; ?>
  <?php print render($title_suffix); ?>
<div class="content">
  <?php print $content; ?>

</div>
mvc’s picture

@VBN: I think you left out the closing div tag. It should be:

<div id="<?php print $block_html_id; ?>" class="<?php print $classes; ?>"<?php print $attributes; ?>>
  <?php print render($title_prefix); ?>
  <?php if ($title): ?>
    <h2<?php print $title_attributes; ?>><?php print $title; ?></h2>
  <?php endif; ?>
  <?php print render($title_suffix); ?>
  <div class="content">
  <?php print $content; ?>
  </div>

</div>
darvanen’s picture

Requires re-architecture, should be tackled in a new version.

darvanen’s picture

See parent issue.

darvanen’s picture

Version: 7.x-1.x-dev » 7.x-2.0-alpha1
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.