We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

0

Menu items are sore in the database. You are still able to export the menu using a contrib module. For Drupal 7 You can achieve that by using Menu Export/Import contrib module. For Drupal 8 You can achieve that by using Menu Import and Export. The module will give you the ability to exports the menu entity as config YAML and will be imported on ...


1

Menu items are saved in the DB, therefore you must update them using update hooks. Something like this should work: function MODULE_NAME_update_N() { $menu_link_id = 1; $menu_link = menu_link_load($menu_link_id); $menu_link['hidden'] = 0; menu_link_save($menu_link); }


3

Found a way to satisfy all the cases without having to create multiple blocks (visibility rules would be odd) or create different menus. I could not achieve this by assuming a content type like in the question, because you could have the same content type nested until multiple areas of the menu, and not really know if the current depth you were at for it ...


2

/** * Implements hook_toolbar(). */ function backlinks_notifications_toolbar() { $items = []; $items['toolbar_menu_backlinks_notifications'] = [ '#type' => 'toolbar_item', 'tab' => [ '#type' => 'link', '#title' => 'Notifications', '#url' => Url:...


0

I found it. Silly me, it was the module Menu link (field), it actually says in the project page The "Menu settings" tab is however removed from the node form and replaced by an field widget. Argh, so much time looking for the reason, I didn't see that one when I uninstalled the ones that were interfering.


0

Most likely, the "Home" menu link is coming from the UI text in Drupal Core. You should be able to enable the "Interface Translation (locale)" module and then obtain .po or .pot files for the respective language (as described on the Drupal.org internationalization page). Refer to https://www.drupal.org/node/1814954 for information about editing the .po/....


0

Use macro instead, that's better for recursive twig


Top 50 recent answers are included