Search code examples
drupaldrupal-7

View block - custom ID in Drupal


How can I change id from block-views-portfolio-view-block to just: portfolio?


Solution

  • Added this to theme's template.php file:

    function THEME_preprocess_block(&$variables) {
      if ($variables['block_html_id'] == "block-views-portfolio-view-block")
        $variables['block_html_id'] = "portfolio";
    
    }
    

    and it is working