Currently the only template suggestion available for blockgroup regions is that of the individual block group.

It would be nice if there could be a more generic one like region__blockgroup, so you can use region--blockgroup.tpl.php to modify all blockgroup regions.

I understand that a possible issue could arise if someone has named a real region "blockgroup", but I think that would be rare enough that you could just mention it in a known issues section of the README & project page, or else make it a setting you can turn on or off.

Comments

rooby’s picture

A work around for anyone that wants it is this (in your theme's template.php file):

<?php
/**
 * Variable preprocessor for region templates.
 */
function THEMENAME_preprocess_region(&$variables) {
  if (strpos($variables['region'], 'blockgroup') === 0) {
    $variables['theme_hook_suggestions'][] = 'region__blockgroup';
  }
}
?>
rooby’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new560 bytes

Here is a patch.

Happy to change the template name if you want to try harder to avoid naming conflicts.

  • znerol committed 7273194 on 7.x-1.x authored by rooby
    Issue #2043743 by rooby: Allow template override for all blockgroups
    
  • znerol committed 6af10d3 on 7.x-2.x authored by rooby
    Issue #2043743 by rooby: Allow template override for all blockgroups
    
znerol’s picture

Status: Needs review » Fixed

Thank you.

Status: Fixed » Closed (fixed)

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

giupenni’s picture

I installed the latest dev but not works.