function groupmenu_block_theme_suggestions_menu_alter in Group Menu 8
Implements hook_theme_suggestions_HOOK_alter().
Add suggestions for menus in the groupmenus block.
File
- modules/
groupmenu_block/ groupmenu_block.module, line 13 - Adds theme suggestions for group menus.
Code
function groupmenu_block_theme_suggestions_menu_alter(array &$suggestions, array $variables) {
if (isset($variables['attributes']['base_plugin_id']) && $variables['attributes']['base_plugin_id'] == 'groupmenus') {
$suggestions[] = 'menu__groupmenu';
if (isset($variables['menu_name'])) {
$suggestions[] = 'menu__groupmenu__' . strtr($variables['menu_name'], '-', '_');
}
}
}