Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Drupal new theme suggestion for block system main with view. Put it to template.php
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