The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [navigation]

Use it for questions about navigation menus and links used in a site.

Filter by
Sorted by
Tagged with
0
votes
1answer
6 views

I have a site that is translated in English and French - can't change “Home” link in menu

My entire Drupal 8 site has been translated except I can't find where to change the translation of the "Home" link. When the site is in French mode (with the /fr) all my menu items show the ...
0
votes
0answers
17 views

Add Class to Parent of route:<nolink> Menu Item

I am trying to work out how to add a class to the parent item of a route:<nolink> menu item. Use case: Having over a hundred Appendix pages that all reside under an Appendixes link (A view page ...
0
votes
0answers
35 views

Region with menu block disappears suddenly, re-appears after re-saving menu

We have a website with a menu in a block, that is placed into a region "Sidebar". My customer notified me that the whole region containing the menu keeps disappearing on the live site, on average once ...
0
votes
1answer
42 views

Building a non-config, programmatically-created, semi-dynamic, semi-manual menu

We have a custom entity called "Topic". With this entity, users can build topics and reference other content to "belong" to the topic. We also have a requirement where, whenever a user creates a topic,...
0
votes
0answers
24 views

Menu options missing in node form

In Drupal 8, despite the fact that there is a menu set for the content type, menu options are not showing in the node form. I have disabled some menu modules in case they were interfering, but with ...
0
votes
1answer
11 views

View linked to the 'main navigation', menu disapears when I click on the menu tab, but I see the page

I'm new with Drupal. I'm using Drupal 8. I've create a View, I've create a Page and linked the page to the 'Main navigation'. In the 'main navigation' I see the new create menu tab. When I click on ...
0
votes
1answer
8 views

Added menu link not showed in menu configuration

I have a very weird problem. If I add a new menu item, I can do it without any error in the menu configuration page, but the item isn't showed in the menu in this page neither in the menu. If I check ...
0
votes
1answer
19 views

Adding an extra class to the last element of the navigation/tree menu

For one of my projects, I have to create a tree menu, with parents and children, that would be used to navigate through the website. The parents are collapsible. Below is the twig file that I am using ...
-2
votes
0answers
23 views

Create a tree view menu

I have to create a sidebar treeview menu for my website. It needs to have a parent-children relationship that would have to be until 5 levels. At the top, it should have a button at the utmost left to ...
0
votes
1answer
18 views

hamburger menu moved after update

We use we-mega-menu. After performing an update the mobile (hamburger) menu changed its alignment to the left as well as some other things I was able to fix the other things but I can't seem to figure ...
1
vote
2answers
97 views

How can I add a link on the “Structure” admin page?

I created a view page with the path being /abc and I want to add this link on Administrative page with a link in Drupal 8.
0
votes
0answers
22 views

How can I only show the current book on book navigation?

I have a list of books and I would only like to see the current book on the book navigation. How can I achieve that?
-1
votes
1answer
16 views

Can I add a menu link with a parameter? [duplicate]

I would like to add a menu link using the "Link"-Field with Autocomplete, but I would like to add a parameter afterwards. Pretty much like this: ...which is not working. Is that possible? Thanks!
0
votes
1answer
27 views

hook_menu() item never reached?

I have a module where hook_menu() was already used to process ajax calls, like this: function bizaudit_menu() { return [ 'bizaudit/ajax' => [ 'page callback' => '...
0
votes
0answers
12 views

Create Taxanomy Menu with specified starting term

D8 Taxonomy Menu module is perfect to create a dynamic menu for a given vocabulary. I would like to create a menu starting with a term or subterm. For example, Vocabulary VocabA 1 Term1 1.1 ...
1
vote
1answer
27 views

Looking for a Menu Module on Node Page [closed]

Out site has many, many nodes included in a number of menus. When creating a node, the Parent Item select box under Menu Settings is quite long. Is there a module that provides a better, more usable ...
0
votes
1answer
25 views

How do I get the menu block choice “Expand all menu items” to stay checked

I have 2x menu blocks. One in the header and one in the footer. I'd like the header one to stay unexpanded, but expand all the items in the footer. When I check "Expand all menu items" in the footer,...
0
votes
0answers
26 views

Divide menu tree parents and children links into columns

I have the following menu tree for my main navigation: Parent 1 (= level 0) SubParent 1 (= level 1) SubChild 1.1 (= level 1) SubChild 1.2 (= level 1) SubChild 1.3 (= level 1) SubSubParent 1 (= ...
-3
votes
1answer
41 views

Login link in menu showing to logged-in user [closed]

On a Drupal 7 site, I created a login link on the main menu with the path user/login. For some reason, the link remains visible to users that are already logged in. I thought this link is supposed to ...
1
vote
0answers
14 views

Can't add sub tab local tasks to admin/content/my_entity

I have a custom content entity list which has its own tab into admin/content/my_entity. The content of this tab is generated by using EntityListBuilder class. Actually, I created it with the drupal ...
1
vote
1answer
24 views

Using the menu API, how do I get only the enabled links?

Using the code below I am able to get all the titles and links from the main menu, however, I only need the enabled ones. I have been searching for an answer for a couple of days but have been unable ...
0
votes
0answers
23 views

.removeClass() for Detached sub menu in menu-main.html.twig

I have a need to have the sub menu not be a nested item in the main level menu li's. I'm not sure my approach is the best, but it is working with a couple caveats: The div <div class="r-sub-menu-...
0
votes
0answers
39 views

How to get identifier for menu link item in form hook?

How to get something unique (like 'menu link id' mlid in Drupal 7) in the form for editing one menu link item? hook_form_alter(&$form, FormStateInterface &$form_state, $form_id) { $mlid=... ...
0
votes
0answers
13 views

How to get array of activeTrail menu id's based on given url

I have a custom module that returns a json output so we can dynamically build the main menu. The issue I've come across is setting the active trail for the current page and the trail up. I am trying ...
0
votes
0answers
13 views

Hook to call a function after menu rebuild?

After a menu rebuild, such as one that occurs automatically when visiting the Modules admin page, some of my Drupal JS behaviors are not in the correct state. I need to re-initialize or attach them ...
0
votes
0answers
16 views

I Cant enable the Responsive-Navigation module after installing it

I want to make the Nav menu responsive for my website and I just downloaded the files for Responsive-Navigation and responsive-nav.js plugin and copied them in modules and libraries folders ...
-4
votes
1answer
26 views

How to have all options of some menu on the same line?

In the mayo theme I use for my site, I have a footer menu. By default, the options of this menu are displayed vertically: I'd like to have the options displayed horizontally. How can I do that?
-2
votes
1answer
28 views

Getting translated version of Menu

I'm trying to get translated variant of Manu, but I can't make it work. This is code of what I'm trying to do, but this is for content node. $entitytype_manager = \Drupal::service('entity_type....
0
votes
0answers
16 views

How to show menu items depending on the user's roles and the node type?

I would like to show some menu items (merged with the main navigation menu) when viewing a node (full content) of a custom content type. Also, this menu items depend on user's roles. It could be ...
0
votes
3answers
57 views

Menu tree from taxonomy terms and nodes which belong to them

i need to create a collapsible menu tree from taxonomy terms and nodes which belong to them (not nested terms, but content pages) i'm totally stuck about it i've found solutions for nested taxonomy ...
0
votes
0answers
9 views

How can I replace Main Menu with other set of Menus as per Roles?

I am using Drupal 7.67. I would like to replace the entire set of MAIN MENU with a different set of menu that I have created for a number of specific users. I want this new menu to show when those ...
0
votes
0answers
17 views

Setting default value to custom fields in menu items

I created a custom boolean field in my menu item using this hook_entity_base_field_info function Mymodule_entity_base_field_info(\Drupal\Core\Entity\EntityTypeInterface $entity_type) { if ($...
0
votes
0answers
23 views

How to add an additional link into node links array programatically?

I would like to add a additional link into the links list of my node-type teaser-display (where "write a comment", "read more" link are located). Also I would like to pass some tokens (token module ...
0
votes
1answer
10 views

Creating 'index' content views for L1-LX within a taxonomy

Note: This is a follow-on question from Creating a displayable 'index' of content nodes within a path Ok, starting to find my feet again within Drupal, and still getting up to speed with views. What ...
0
votes
2answers
39 views

How to get and display menu items except the parent item?

Let's say my menu tree is like below: Parent Sub-Parent Child I want to get the Sub-Parent title and all child's title and url. How can I do it in Drupal 8? I have looked at this answer but it ...
0
votes
0answers
29 views

8 - Cannot get clean URL's to work in macos mojave

Trying to install Drupal 8 on my macos mojave but cannot get clean URL's to work. But failing. Here are my configs at /etc/apache2/httpd.conf: Rewrite mod and vhosts include is uncommented... ...
2
votes
2answers
137 views

How can I have the language-specific 'enabled' Boolean of menu items being respected?

I'm trying to translate the 'enabled' field of menu items in Drupal 8. So far I have written this code in MYMODULE.module file: function MYMODULE_entity_base_field_info_alter(&$fields, \Drupal\...
0
votes
1answer
64 views

How do I turn off mobile menu collapse for bootstrap 3 theme in drupal 8?

I am looking to use a different mobile menu solution and replace the default bootstrap 3 mobile menu. How can I turn off the bootstrap collapsed mobile menu function?
1
vote
1answer
34 views

Is the homepage considered in_active_trail?

I'm learning Drupal 8, so still very new to it. I'm working on customizing the main menu. I've been able to add Twitter Bootstrap to my custom theme. I've made a custom menu--main.html.twig file. I'...
0
votes
0answers
38 views

Display another page's content without changing url for drupal 8

I want to display another page's content without changing url for drupal 8 . In drupal 7 I used menu_execute_active_handler() , but drupal 8 this function is not available. I got a solution from ...
0
votes
1answer
9 views

What is needed to keep parent menu element active while browsing subpages (Bartik Theme)

Let's say we have 2 sections with pages like this structure: /section1 * /section1/page1-1 ** /section1/page1-1/page1-1-1 ** /section1/page1-1/page1-1-2 ** /section1/page1-2 ** /section1/page1-3 ** /...
0
votes
1answer
171 views

Error when upgrading to Drupal 8.7.1 on module menu_link_content

When running database updates (on domain.com/update.php) from 8.6.15 to 8.7.1, I got the following error: module menu_link_content Update make_menu_link_content_revisionable Custom menu links have ...
1
vote
0answers
31 views

Menu item URL not updating using MenuLinkManagerInterface::updateDefinition()

When trying to update an existing menu link URL/ URI with updateDefinition() - https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21MenuLinkManagerInterface.php/function/...
0
votes
0answers
30 views

How to limit the number of top level menu items

I have a horizontal top level menu and only room for 7-8 links without breaking the layout. Is there a way limit the number of top level menu items? I found an old answer to the same question on ...
0
votes
1answer
358 views

How to add a nolink menu item

I'm creating a menu item for my main navigation bar. It looks like this: module/module.links.menu.yml: top.link: title: 'Operations' description: 'Operations' parent: main menu_name: main ...
0
votes
0answers
15 views

Change maximum depth of a menu tree

I discovered today that Drupal 8 only allows you to add menu items in a maximum of 9 levels. I understand this is more than enough for most users, but I'm using the menu system to organize pages for ...
0
votes
1answer
38 views

Submenu tree problem

I have a website build with Drupal 7 CMS and I am using the Submenu tree module. Everything was working fine for months, but few weeks ago I have received a feedback from the client that all the links ...
2
votes
1answer
23 views

How do I add an extra “Add content”-link to the admin toolbar dropdown

I am trying to add some improvement to the workflow of the webmasters. Right now they have to click "Content", and then click once more on the "Add content" button. Since I am working with the "Admin ...
0
votes
0answers
11 views

Menu link title used as page title on first access

Simple problem: I defined some main menu links under /admin/structure/menu. Whenever i access the linked page, the page title shows the menu link title and not the title set in .module. Every access ...
0
votes
1answer
13 views

main menu disappears only on home page

I have a site online engcorrect.net and for some reason my menu on my homepage disappears. On all other pages, it shows. The weird thing is that on my localhost (local machine) it shows correctly but ...