is there a theme suggestions with block id if there is more than on block on the same page from the same vocabulary ?
Hello,
For easy for user to override twig, I think you should add code for hook template file
HierarchicalTaxonomyMenuBlock.php, we add bold code to line 283
return [
'#theme' => 'hierarchical_taxonomy_menu',
'#menu_tree' => $tree,
'#route_tid' => $route_tid,
'#cache' => ['max-age' => 0],
'#current_depth' => 0,
'#vocabularies' => $vocabulary,
'#max_depth' => $max_depth,
'#attached' => [
'library' => [
'hierarchical_taxonomy_menu/hierarchical_taxonomy_menu',
],
'drupalSettings' => [
'collapsibleMenu' => $this->configuration['collapsible'],
],
],
];
}
hierarchical_taxonomy_menu.module, add bold line and hook
/**
* Implements hook_theme().
*/
function hierarchical_taxonomy_menu_theme($existing, $type, $theme, $path) {
return [
'hierarchical_taxonomy_menu' => [
'variables' => [
'menu_tree' => [],
'route_tid' => NULL,
'vocabularies' => NULL,
'current_depth' => 0,
'max_depth' => 0,
],
],
];
}
Add hook
/**
* Implements hook_theme_suggestions_HOOK().
*/
function hierarchical_taxonomy_menu_theme_suggestions_hierarchical_taxonomy_menu(array $variables) {
if (isset($variables['vocabularies'])) {
return array('hierarchical_taxonomy_menu__'.$variables['vocabularies']);
}
}
Thank you.
Fixed
1.14
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
is there a theme suggestions with block id if there is more than on block on the same page from the same vocabulary ?