Questions tagged [navigation]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
14 views

When I clear cache, my menu ordering seems to go out of order

When I clear cache, especially on high traffic times, my menu seems to go out of ordering. Usually I don't see any log messages except for one time: Message Drupal\Core\Database\...
0
votes
1answer
15 views

Token Filter module to work on Menu URL and Title

menu_token module is working fine to achieve the purpose. Does the module token_filter has this functionality? I can use tokens in wysiwyg using token_filter but cannot make it working for menu title ...
0
votes
0answers
24 views

getUrlObject() returning empty proto object

I'm trying to follow this post to turn my menu tree into an array I can more easily work with. When I run my code and look at $filteredArray I get: title: *Name here* url_obj: {} has_children: true ...
0
votes
1answer
19 views

Drupal 8 Accessing Menu Tree in a Block's JS

How can I pass the menu into a block's javascript? I am trying to build a block for a custom mobile menu (client wants specific logic/animations/etc) and use that in Structure > Block layout > Main ...
-1
votes
0answers
25 views

Need some guidelines for working on Drupal theming [closed]

Drupal version: 8.8.2 Hello fellow Drupal devs, I am new to drupal, but have good experience in PHP. Website is related to tiles. I am trying to do a project-specific custom theme. Having some ...
0
votes
0answers
11 views

Can we make Superfish Top Menu not clickable but upon hover shows sub-menus?

I'm new to Drupal 7 and working on a website which is customized built using alpha theme. So far I'm good in understanding the working of it and creating content from the front end. For the main menu, ...
2
votes
1answer
31 views

How to add local task links to referenced entities for a specific content type?

I have a content type with some entity reference fields to another content types. I want to add local task tabs to the node view page, to link those referenced node. However I cannot figure it out how ...
0
votes
0answers
19 views

How to access custom fields of Menu item content fields module from twig?

Installed "Menu item content fields" module: https://www.drupal.org/project/menu_item_fields And also "We mega menu": https://www.drupal.org/project/we_megamenu Then I added one image field to ...
0
votes
0answers
8 views

Move field into the Menu settings on node edit

I want to move a field into the "Menu settings" section in the sidebar on node edit form page with the following code: /** * Implements hook_form_alter(). */ function mymodule_form_alter(&$form,...
0
votes
2answers
62 views

Breadcrumbs/menu for dynamic pages

Im breaking my head around getting the breadcrumbs set properly on views page. my views' page address is "teachers/%" where % is a term-id. I have a content type called 'program' with a field ...
0
votes
1answer
44 views

Render an HTML element before the menu with hook preprocess menu

I want to render an HTML element like <span>This is my menu</span> before my menu. I thought the most easy solution is to alter the menu. I already altered my menu to add a class. But how ...
-2
votes
1answer
25 views

Change Superfish menu on specific pages

Is there any way I can change the menu in Superfish module in specific pages? What I know so far is that Superfish uses the "Main Navigation" in the admin structures by default. Can I create a ...
0
votes
1answer
26 views

drupal 8 modifying the menu items path

I work on an drupal 8 application that use the group module with the restriction of only one group per user. i want to be able to modify the menu items so that the id of the user's group is always in ...
1
vote
0answers
23 views

How to add a span before my menu title link [duplicate]

This is the default Drupal menu: <ul> <li class="menu-item parent"><a href="" title="">0.0 Bla</a></li> <li class="menu-item parent"><a href="" title="">...
0
votes
1answer
37 views

How do I add an external link in a module?

I'm attempting develop a module in drupal-8 that provides a link to an external password reset system. Specifically on the login page I'd like a reset my password link that points to a link such as ...
0
votes
1answer
21 views

Display selected menu parent with children in sidebar

I have a menu build with taxonomy menu structured like this : Agenda agenda1 agenda2 News News1 News2 Access Access1 Access2 My main navigation is like this (no children): Agenda | News | ...
0
votes
1answer
20 views

Multiple versions of the same menu, based on associated term?

I am trying to create a site with different portals. Each portal displays content filtered to that person's user tag, i.e. Student, Staff, etc. It's easy to create a view that displays nodes with that ...
1
vote
2answers
31 views

How to add /admin/people as a tab to a custom menu?

In a custom module (association), I ceated views that are accessible thru tabs: The paths are defined in the views; Adhérents et personnes -> /association (this one is also defined as a menu item) ...
0
votes
0answers
34 views

Fix problem in off-canvas menu module for Barrio Sub-theme [duplicate]

I need help with changing a Barrio(v 8.x-4.22) sub-theme of Drupal 8 This is what I've done until now: I installed the Barrio sub-theme I installed the Responsive and off-canvas menu Drupal 8 ...
0
votes
1answer
20 views

How to add a custom module to a menu?

I am using Drupal 7. I have just built a wonderful custom module. Now I need to add it to my main menu, under the parent item "Tools and Resources." I know I can go to the homepage and click on the ...
0
votes
0answers
20 views

Update module menu link location

I have a custom module on a Drupal 8 site which has a controller defined with a menu item placed in the main menu. I would now like to move the menu item from the main menu to a different menu. I ...
0
votes
0answers
79 views

How to translate menu items with migrate?

I'm importing menu items from CSV using migrate, migrate_tools, migrate_plus and migrate_source_csv. This is an example of how I'm doing it for the original language: source: plugin: csv path: '...
1
vote
0answers
38 views

How do you update node menu links?

I am creating Drupal 8 node using code and same time I am assigning a menu link as well its working fine. I am creating a menu using this code. MenuLinkContent::create([ 'title' => $item['...
0
votes
0answers
34 views

How do you cache a menu when loading it programmatically?

I am having the below code to load the main menu tree. $tree = menu_tree_all_data('main-menu'); $parentMenu = array(); $index = 0; foreach($tree as $key => $value) { if (!empty($value['...
0
votes
1answer
32 views

How to define frontend theme (non-admin) for a given node tab route?

In my custom module I want to define a new tab associated with nodes. I have my own custom route file with the required definitions and a Links file to make sure the new route will be displayed as a ...
0
votes
0answers
22 views

How can I create a menu item AND tabs in a view?

Building on How to create views tabs in D8? where the asker gets information on how to turn the different pages in their view into tabs, I would like to also add a menu item for my default tab in the ...
0
votes
1answer
31 views

Last modified date in menu link

I have a book with some child pages and I'd like to show the last modified date of each corresponding node near them in their menu tree links, or a red badge near the nodes updated during eg. the last ...
0
votes
1answer
23 views

if current_node is in menu, do something in theme.inc

I'm trying to check if the current node (of a specific content type) has been added to a menu (using the "Provide a menu link" in the node edit GUI). if it has, I need to set a variable in .theme....
0
votes
3answers
75 views

How do you deploy a change to a main menu?

We have a small D7 site. We want to deactivate a main menu item. On dev server I was able to deactivate it in /admin/structure/menu/manage/main-menu I believe The menu is stored in the DB, right. ...
4
votes
1answer
173 views

How to get a section of the menu tree based on the current node?

I am currently struggling to wrap my head around how the menu tree and menu link services work for outputting part of a menu with some custom requirements. Admittedly I don't have to do this very ...
0
votes
1answer
47 views

how to a link in Admin black toolbar

I created a custom module and how to add a link along with icon. Basically, I want to add notification icon backlinks_notifications.index: title: 'Notifications' parent: system.admin_config_ui (...
0
votes
0answers
14 views

In the “Add menu link” form, filter “Parent link” field to show only the menu I'm adding the link to

In the Add Menu Link form, the "Parent link" field has <Administration> and its children as options. This makes sense, as I clicked "Add link" from the "Operations" for the Administration menu. ...
0
votes
1answer
14 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
23 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
40 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
47 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
1answer
30 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
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
21 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 ...
0
votes
1answer
19 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
105 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
27 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?
0
votes
1answer
20 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
44 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
74 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
42 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
19 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
2 3 4 5
31