Created
August 27, 2014 11:13
-
-
Save pustynnykh/517a5d20cfe8588e776f to your computer and use it in GitHub Desktop.
Drupal new theme suggestion for block system main with view. Put it to template.php
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
function theme_preprocess_block(&$vars) { | |
$block = $vars['block']; | |
if($block->module == 'system' && $block->delta == 'main' && function_exists('views_get_page_view') && views_get_page_view()){ | |
$view_object = views_get_page_view(); | |
$vars['theme_hook_suggestions'][] = 'block__views__' . $view_object->name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment