Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've got a menu block that's machine name is 'menu-peanuts' . I need the title of the menu block to be the page/node title for instance:
I've got a page called 'Info' . I need the title of the menu block to be 'Info' on that page. On another page called 'Contact' I need the menu block title to be 'Contact'.
I hope you understand me and can help me ;)
I've tried this in my template.php but it's not working:
function hook_block_view_menu_block_menu_peanuts_alter(&$data, $block) {
$data['subject'] = drupal_get_title();
}
Thank you for your help (and your module).
Comments
Comment #1
JohnAlbinSorry for not responding sooner!