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
27 views

Menu setting not visibile for other roles on Node Form

In Drupal 8 I am creating Editor role with limited access, but the Editor cannot see "Menu Settings" while creating or editing content, this would be helpful when Editor add the node to the ...
0
votes
0answers
61 views

How to organize the summary of a book?

I created a book with the module provided by Drupal 8, but I am unable to organize the pages of the book correctly in a view. I want to organize the book in this way. In the left block, pages and sub-...
0
votes
1answer
34 views

Tabs: invalidating cache tags does not lead to a rebuild of the tabs

I have a custom route defined with a custom access check. Apart from some more checks one of the rules for accessing the path is that a specific custom entity exists. The access check does the ...
0
votes
0answers
22 views

Adding custom module path to admin menu

I created a custom module with a configuration settings page. It works fine, but I can't get it to show up under the admin configuration menu. I think the problem is I specified system....
1
vote
3answers
55 views

Custom Module to remove User Menu Tabs

I'm hoping someone can take pity on me because I just can't seem to figure out how to make a simple module to remove, or hide some tabs in my user pages. I read the docs on making custom modules, ...
2
votes
2answers
34 views

What is the replacement for menu_link_load()?

Drupal 7 has menu_link_load() to load a single menu item. What is the Drupal 8 equivalent?
1
vote
1answer
17 views

Some pages hide content unless “Read more” is clicked

If I have multiple pages on Drupal, some show the full page, and others say "Read more" and will only show the whole page when it is clicked. It doesn't seem to have anything to do with the ...
0
votes
0answers
13 views

How to add a content navigation menu based on taxonomy or parent relation?

We are new to Group module and we can't figure out how to create a content navigation menu/tree we want to place to the left of the group page. We are evaluating generating this menu by taxonomy or ...
0
votes
0answers
17 views

How to properly configure the Mega menu module?

first of all I would like to point out that I speak very poor English, sorry in advance for the poor quality of the translations... (Google Translate) I recently encountered several problems with the ...
0
votes
0answers
10 views

How do i add an attribute to a certain script tag (my mobile navigation)

my problem is, that i have to add the attribute "data-pagespeed-no-defer" to the script tag of my mobile menu. i use responsive menus which produces the following tags (if advagg is disabled)...
0
votes
0answers
31 views

Administration menu links are incorrect

I installed drupal 8 using composer, which installed at location /var/www/html/drupal8/web. I updated apache root directory to this location, which allows me to access the site at mysite.com (rather ...
0
votes
0answers
36 views

Adding classes and aria labels to menu through template file to add accessibility, Drupal 7

How can I add classes and aria labels to main menu in template file Drupal 7 to enable accessibility in main menu dropdown. "ul" and "li" tags already have styling I need to add &...
0
votes
2answers
26 views

Build out a complete main nav menu for a module - not just adding one menu link

I've been finding a lot of info about how to add a menu link as part of a module. That works fine using the route/controller & links.menu.yml file. But I am now trying to figure out how to add a ...
1
vote
0answers
26 views

Different node parent menu for per language

My struggle with Drupal 8 continues as I moved onto i18n settings. I've enabled and configured content translation and now I'm facing issue of menu displaying untranslated pages. Popular suggestions ...
0
votes
1answer
30 views

How to define an internal link as parent in mymodule.links.menu.yml?

How do I create a menu link programmatically to a node that I can use as a parent for other links? In MYMODULE.links.module, I defined some links for my navbar: MYMODULE.parent-fruits: title: '...
0
votes
0answers
21 views

Drupal 8 Menu Block is not showing in left region for dynamically created routing page

I created some menus under 'Main Navigation' and assigned into the side bar region. I selected the depth level starting from 2 to 4.(See the screenshot) The menu block is not showing for dynamically ...
0
votes
1answer
35 views

How to allow the translation of menu links provided by my_module.links.menu.yml

I have the Configuration Translation module installed in a multilingual site and I am able to translate any menu created with the UI.... This is fine!! I have a module which is creating some menus ...
0
votes
1answer
52 views

How to add a field to menus?

I am trying to add an extra text field to the menu entity. My field is showing up and saving input but the input saves for all menus not just the one I entered the data for. This is how it is now: ...
0
votes
0answers
20 views

Token support on the menu link field

Is there is any alternative way to make token to work in the Drupal 8 menu link field other than Menu Token module. I want to use token to set as a default value when I am creating new menu, but if I ...
0
votes
0answers
22 views

Views page menu shows up on all languages

I am working on a old website built on Drupal 6 which has two languages. There is a views on which I created a page for each language, but their menus shows up on both languages. I tried different ...
0
votes
0answers
25 views

Why do I see the node ID on the menu URL instead of the path alias?

I created different menus and need them to be displayed in a node based on the language currently visited for a specific node type. Via my theme.theme, I added the following code to retrieve the menus:...
1
vote
0answers
22 views

Local action on node but path a child of node?

I have created two local actions which I want to display on my nodes, General Configuration and Advanced Configuration. General Configuration will show at node/%node, but Advanced Configuration is ...
1
vote
1answer
24 views

Non-Config Menus

I have this requirement where I would need to create a menu every time a user creates a new instance of a custom entity I'm building. One can easily do this with Menu::create() on entity creation, but ...
0
votes
0answers
19 views

Menu token not working sometimes

I am using /user/[current-user:uid]/edit to generate the user profile setting page where user can edit there profile. Sometimes it works and sometimes it displays the wrong user id and sometimes I get ...
0
votes
0answers
19 views

Moving nodes and menus between environments

I've a large menu of basic pages I'm trying to move from my D7 development environment into production. So far I've been trying to use the Node Export module to build a feature. That didn't seem to ...
0
votes
0answers
25 views

How can I change the name of the link “Home” in the header to another name?

At first I tried to change it in Structure / Menus / Main navigation but I can’t change the name there. There I can only change the region in which the link is located and Weight. Then I decided to ...
0
votes
2answers
23 views

Menu hook callbacks not working for anonymous users

My custom error handler module is somewhat based on the customerror module, but instead of returning markup, my menu callback function redirects based on the original path. It registers error paths as ...
3
votes
1answer
113 views

Navigate to next page / previous page based on entity reference field instead of Book module

I am trying to create next/previous page links like the Book module. I have two content types, Chapter and Page. The Chapter content type contains an entity reference field (unlimited) for pages. ...
0
votes
2answers
54 views

How to load a menu item and its children menu items? [duplicate]

I have the menu item id. I want to display that menu item with its children. Suppose for example I have menu item test and it has two children menu items. So I want to load them and display it as ...
0
votes
0answers
16 views

Adding Custom block types to layout builder side menu

I've created a custom bock type but what to either show it under Add GT Blocks or Start my own menu on the layout builder modal. I've placed this in a module so I would like to add it there. Otherwise ...
0
votes
0answers
12 views

How to pass entity id variable to _menu() to use for a custom href nav button?

I'm using the Entity registration module which builds the navigation buttons inside function registration_menu() How Can I pass on the entity id to _menu($entityid) so I can use it within to insert ...
1
vote
1answer
41 views

Change Classes in Nav-Tag of Custom Menu

On a Drupal 8 installation, I have a menu in the sidebar first region. I want to add classes to bootstrap classes to the different levels of that menu. For that I created a my own menu template, which ...
0
votes
1answer
75 views

How to get links of translated node edit page in the secondary tabs

In D7, if a node is translated, let say in French and if you are in the entity.node.edit_form page then you could find 2 secondary tabs: [French] and [English] pointing to the edit_form of each ...
0
votes
1answer
22 views

How can I programmatically delete a custom menu?

I'm writing a hook_deploy_N that moves a bunch of menu items from a deprecated custom menu to some newer ones. So far, so good. After moving the items, I want to delete the old menu, but can't figure ...
0
votes
0answers
20 views

Menu links won't appear

I generated 2 entities and addtyed a new Form with the overview of them. But when I try to add links, they won't appear. I follow the guide but wont work. Form and Entities work. The routings are ...
1
vote
1answer
55 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
20 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
27 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
23 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 ...
0
votes
0answers
15 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
46 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
51 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
10 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
70 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
47 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
33 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
29 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
25 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
42 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
30 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 | ...

1
2 3 4 5
31