If you are using Bootstrap 7.x-3.x (Bootstrap 3 for Drupal), you will need to make a few quick changes to get this module working.
- Update your block.tpl.php file (preferably in a subtheme)
- Change the collapse block selectors in your theme settings (ie: /admin/appearance/settings/bootstrap).
Suggested selectors
Block = .block
Title = :header:first
Block Content= .content
Changes in block.tpl.php
Surround <?php print $content ?> with this div and class <div class="content"> .. </div>
The result should look something like this:
<section id="<?php print $block_html_id; ?>" class="<?php print $classes; ?> clearfix"<?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>
</section>
Comments
Comment #2
wpwentzell commentedThank you! Works perfectly.
Comment #3
girlbrg commentedI'm new to drupal. I follow these steps but the block still does not collapse.
I am using the Facet API Collapsible with Collapsiblock to make a side bar,that can be colapsible and the elements have checkbox.
I found no solution. I am using the bootstrap theme.
Comment #4
candelas commentedSame as @girlbrg with Bootstrap 7.x-3.14. No errors in console and a collapsed block doesn't open. Thanks for any tips! :)
Comment #5
darvanenSee parent issue.
Comment #6
darvanen