You are here

function blockgroup_preprocess_block in Block Group 7

Same name and namespace in other branches
  1. 7.2 blockgroup.module \blockgroup_preprocess_block()

Implements hook_preprocess_HOOK().

Prepend theme_hook_suggestions with block__blockgroup__default such that the default blockgroup template is picked up only if there is no more specific template for this particular block group.

File

./blockgroup.module, line 380
Add block groups to block configuration page

Code

function blockgroup_preprocess_block(&$variables) {
  if ($variables['block']->module === 'blockgroup') {
    array_unshift($variables['theme_hook_suggestions'], 'block__blockgroup__default');
    $variables['region'] = blockgroup_get_region($variables['block']->delta);

    // Allow the use of a region--blockgroup.tpl.php template that will affect
    // all block group regions.
    $variables['theme_hook_suggestions'][] = 'region__blockgroup';
  }
}