Last active
December 24, 2015 21:49
-
-
Save hkirsman/6868514 to your computer and use it in GitHub Desktop.
Find the first block in content region that is not messages block and add class first-content-block-in-region to it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function THEME_preprocess_page(&$vars) { | |
foreach ($variables['page']['content']['content']['content'] as $key => &$var) { | |
if (isset($var['#block']) && $key !== 'delta_blocks_messages') { | |
$var['#block']->css_class = 'first-content-block-in-region'; | |
break; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment