Skip to main content
4 votes
Accepted

How can I invalidate the entire cache when saving menu item?

The Simplify Menu module has the problem that it doesn't transport cache metadata and a code like \Drupal::cache()->invalidateAll() doesn't exist. You can add the most important cache tag to the ...
4uk4's user avatar
  • 100k
2 votes

Finding all nodes not referenced by a menu

In Drupal 9 can use this 'menu_link_content_data' table to find whether node has any reference as menu: Snippet code for finding all nodes not referenced by a// Get all nodes. $nids = \Drupal::...
mini_poojasharma's user avatar
1 vote

How can I invalidate the entire cache when saving menu item?

\Drupal::cache()->invalidateAll() does not invalidate the content of all the cache bins; it just invalidates the content of the cache.default bin. The Workspaces module uses ...
apaderno's user avatar
  • 97.5k
1 vote

Hook for hiding menu links based on user access

I prefer controlling this behavior via access to the entity rather than at the menu level because it means that anyone with a direct link to the entity won't have access AND if a user does not have ...
sonfd's user avatar
  • 7,906
1 vote

Include html entities in dynamic menu links

I got one way to solve it: return html_entity_decode('© ') . date('Y') . " " . \Drupal::config('system.site')->get('name'); see: https://api.drupal.org/api/drupal/core!...
piridium's user avatar
1 vote

How to show menu tab only for certain node type?

The code below work for me. in the routing.yml mymodule.cache_clear: path: '/node/{node}/cache' defaults: _form: '\Drupal\mymodule\Form\APICacheClearForm' _title: 'Cache Clear' ...
vinhdv's user avatar
  • 1,402
1 vote

How to display more than 10 items in link widget autocomplete?

There is an issue on Drupal.org to extend link widget to have limit and operator settings the same way as for entity reference autocomplete widget https://www.drupal.org/project/drupal/issues/3341689#...
Artem's user avatar
  • 11
1 vote

Accordion is not working in field group module

Please make sure you have installed and enabled https://www.drupal.org/project/jquery_ui_accordion
user1657643's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible