Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It would be AWESOME if we could integrate this with Block Class module http://drupal.org/project/block_class. It would help immensely with responsive theming. For example, when using bootstrap, if you can create a block group and then add "row-fluid" class it would allow you to easily create an additional region and lay out your blocks within it and keep it responsive. I had to use the tip from a previous issue to add those classes within template.php
Comments
Comment #1
znerol CreditAttribution: znerol commentedThe markup of outer blocks (i.e. blockgroups) is currently removed completely and therefore block-class settings will not have any effect. I do this because otherwise we'd inherit all the block-style including margins and stuff resulting in awkwardly indented blocks. Nested blocks would be very difficult to style and that's the reason only the region-markup is rendered by default.
You have two options now:
block-blockgroup-default.tpl.php
to your theme and customize it (i.e. add a div-wrapper with the block-classes.I recommend the latter. Actually I posted the Region Class module a couple of days ago for exact that purpose.
Comment #2
znerol CreditAttribution: znerol commentedThe Block Class module adds an additional field to the core block database scheme. Therefore classes added to blocks using the block class module are very tightly coupled to the block object itself. Regrettably there is no easy way to access this data from within a
hook_preprocess_region
(besides querying the database).I'm in the course of releasing a new version of the region class module with block group support. With that module it is possible to set CSS classes directly from the block group configuration form.
Comment #3
mpa3b CreditAttribution: mpa3b commentedI tried to customize block-blockgroup-default.tpl.php — no change.
Changes in theme directory and the original template files show no influence on resulting markup.
Comment #4
znerol CreditAttribution: znerol commented@mpa3b: Please use the Region Class module if you like to assign classes to block groups. If this is not about classes on blockgroup regions but more about generic block-group theming, then open a new issue.