Questions tagged [navigation]
Use it for questions about navigation menus and links used in a site.
1,617 questions
0 votes
1 answer
89 views
Programmatically rendered menu not visible to anonymous users
I'm trying to setup a subnav system on my site so that content creators can select a menu via a reference field and that menu will be rendered on that page. I have this field working on one of my ...
0 votes
1 answer
45 views
Can't see the Module tab on the home page of new site
I am new to Drupal, and web development infact. I am having a very frustrating time trying to get myself set up. I have intalled Drupal 11. I am assuming the newest version is the best.. I am trying ...
-1 votes
1 answer
350 views
Multilingual menu links are displayed on all languages no matter the settings
Menu itself has no language, only menu links have language. This means that only links in selected language for current page should be shown. This is how it has worked since Drupal 7. But for some ...
0 votes
2 answers
790 views
How can I ensure external links open in a new tab?
I recently had to solve a problem where my theme was preventing the attributes of a menu link from displaying. I didn't know the problem at first. I problem solved first by trying various modules and ...
0 votes
1 answer
65 views
menu tree behaves differently on two differents sections
i'm maintaining a drupal i didn't developed. I fixed some issues in the menu template (e.g. /themes/custom/{mytheme}/templates/menu--menu-{my-menu-name} ) this template is called at two places in the ...
1 vote
0 answers
53 views
How to add menu to a region when viewing a node revision?
We have a layout with the menu in a left 'sidebar' region. The menu opens to the correct parent item when browsing a node as it should. When browsing the latest (or any) revision of the node, the menu ...
0 votes
1 answer
157 views
Editing block to update/remove menu items
I am new to Drupal and I'm trying to fix items on a website, which have several blocks containing menu items. I don't want to delete the blocks, I just want to edit them to remove/update the menu ...
0 votes
0 answers
64 views
Overriden Book Navigation template is not showing for anonymous user
On Drupal 10, I have copied and modified the book-navigation.html.twig file to my custom subtheme "templates" folder (/themes/custom/my_subtheme/templates/book-navigation.html.twig). This ...
-2 votes
1 answer
519 views
Is there a Drupal way to make a menu horizontal and responsive and leveled (similar in style and behavior to a main navigation menu)? [closed]
I have added a menu to a block in a full width region but my problem is that this menu appears vertical and I didn't find a way in Drupal to make it horizontal, similar in style and behavior to a main ...
2 votes
2 answers
428 views
How can I invalidate the entire cache when saving menu item?
I use the Simplify Menu module. Since changes in the menu are not applied, I would like to clear the entire cache. Unfortunately the following code does not work function ...
0 votes
0 answers
93 views
How can I prevent Drupal's translation functionality from changing a menu's links?
I have an about page at /about and a Spanish translation of the page at /es/about. However, when I visit /es/about, the links in my main menu all have /es prepended to the paths. How do I prevent ...
0 votes
1 answer
340 views
Hook for hiding menu links based on user access
I have a Drupal 7 module that uses hook_preprocess_menu_link() to hide menu links based on user access. I am in the process of migrating to Drupal 9, and it seems that hook_preprocess_menu_link() ...
0 votes
0 answers
34 views
Get current node url in a custom block [duplicate]
I'm trying to embed Discourse comments in Drupal, so I'm tryinig tu use this code snippet in a custom block : <div id='discourse-comments'></div> <meta name='discourse-username' content=...
1 vote
1 answer
53 views
Include html entities in dynamic menu links
I implemented a class CopyrightMenuEntry extending MenuLinkDefault which provides a custom menu entry (without link) with the current year and the site name. class CopyrightMenuEntry extends ...
1 vote
0 answers
166 views
Disable custom module Block Caching or force correct caching
I have build a custom module that builds out a list of child page links based on 'this' page's id. Logged in it works as expected. But an anon user has problems which range from the block not showing ...