Skip to content

Instantly share code, notes, and snippets.

@csakiistvan
Created May 7, 2015 09:28
Show Gist options
  • Save csakiistvan/298f48633a0761f6b4b7 to your computer and use it in GitHub Desktop.
Save csakiistvan/298f48633a0761f6b4b7 to your computer and use it in GitHub Desktop.
Add class all block in specified region
/**
* Implements hook_preprocess_block().
*
* @see block.tpl.php
*/
function base_theme_preprocess_block(&$variables) {
if ($variables['elements']['#block']->region == 'footer') {
$variables['classes_array'][] = 'col-xs-12 col-sm-6 col-md-3';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment