People who code: we want your input. Take the Survey

Questions tagged [navigation]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

“Content”- Section in Backend cannot be displayed after installing translation module (German)

after clicking on the "Content"-button (=Inhalt) there is an error displayed. I am not able to enter the "conten" Section of my Drupal 9 backend. This happened right after I ...
16
votes
10answers
21k views

Add class to content field (link)

I want to add a class to the <a> tag of a field that consists of a link and text. (It's a field of type Link.) The name of the field is content.field_c_button_link. In the template file, I ...
0
votes
1answer
29 views

Additional attribute for menu link

How I can add itemprop="url" for each link (<a>) in main menu? So, I need to get from <a href="/node/114" data-drupal-link-system-path="node/114">Test</a&...
0
votes
1answer
44 views

<nolink> top items rendered as <a> and remain clickable (give page refresh)

I have a TB megamenu (8.x-1.x-dev) with a few top-level (parent) items that are not links, they should just trigger the submenu to drop down. According to the documentation I could find, links marked ...
0
votes
1answer
72 views

Hiding a tab on a user profile based on the user role

I'm making a site using Drupal 8 and I have several roles defined, one of them is Writer. I made a view to show as a tab in the user profile pages called Backlist. If the user is a writer, they can ...
1
vote
1answer
903 views

Bartik theme main menu

I am dabbling fresh with Drupal 7 and so far having little success with getting the Menu to behave the way I want it to. My CSS and PHP basics are strong, but understanding Drupal's system is in ...
1
vote
1answer
2k views

Changing the url which the logo links to

I'm using Zen Theme 5.x and want that the site logo links non to the front page but another page in my base url, like to a contact page. It seems that I can achieve this modifying the page template ...
0
votes
1answer
154 views

Main menu is hidden from unauthenticated users

I am using a slightly modified Responsive Batrik theme. The odd thing is that the main manue and site logo are hidden from unauthenticated users. When they log in, they can see the menu and logo. I'...
0
votes
2answers
197 views

Show custom menus in seven theme

I am using Seven for the theme of a internal application. I have custom items setup in the mainmenu, but cannot get it to show?!?! The blocks for seven are limited to content and help (despite the ....
1
vote
1answer
516 views

Adding website logo as the first top level menu item in tb megamenu [closed]

I am usting tb megamenu module to get a main menu on my site. Is there a way to add the website's logo as a top level menu item (NOT SUBMENU ITEM)
2
votes
1answer
51 views

Display external link using theme settings

I'm using theme-settings.php to store links to external pages (like Facebook, Twitter, etc.) and the links aren't storing correctly. In theme-settings.php, I have: function ...
2
votes
2answers
249 views

Views Accordion to be accessible by keyboard

I need the Views Accordion module in Drupal 7 and what is in it to be accessible by the keyboard. When you are tabbing, it skips it completely. Also the screen reader does not recognize the closed ...
2
votes
1answer
61 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
1k 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
1answer
33 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 ...
1
vote
3answers
60 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, ...
0
votes
0answers
76 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
41 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
24 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....
2
votes
2answers
70 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
2answers
3k views

How do I add local tasks menu to a views page display

I have created a views page display that has the path /node/%node/sessions, contextually filtering by content ID. It also creates a "menu tab" called "Sessions". Therefore when I got to node/12 I ...
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
15 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
46 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 ...
1
vote
2answers
675 views

User specific permission to add links to a menu

When I create a content type, e.g. 'Basic Page' and I want to add a link to a menu I do usually the following: Menu settings -> Provide a menu link -> choose a menu and its position of the link there ...
0
votes
0answers
11 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
39 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
3answers
3k views

Sub-menu items in twig

How can I theme all the menu levels individually in menu.html.twig? I need to give different markup to the 2nd (child) and 3rd (grandchild) level, and in the twig I only have parent and child. {% ...
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 ...
0
votes
1answer
91 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: '...
1
vote
0answers
40 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
0answers
22 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
56 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
1answer
112 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
0answers
42 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
23 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
27 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
29 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 ...
5
votes
3answers
5k views

Adding a link to an image

Is there a module or a way in core to have an Image field be a clickable link to a URL that is either entered as an additional setting for the Image field or can be pulled from another field that ...
0
votes
0answers
40 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
24 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 ...
1
vote
3answers
4k views

Load a full menu with active trail

I need to load a full menu for navigation in a custom theme with active trail, and can't find any way to do it, but that can't be right. I can't imagine such an obvious and widespread use-case having ...
0
votes
2answers
28 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
234 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. ...
1
vote
1answer
143 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
2answers
419 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 ...
5
votes
1answer
7k views

Drupal 8 Permission to see Structure > Menu

Drupal 8. I want a user with a certain role to be able to see and administer menu items /admin/structure/menu/manage/main On the permissions page /admin/people/permissions I have 'Administer menus ...
0
votes
1answer
190 views

Unable to Edit Main Navigation Drupal 8

I installed a custom theme called StartupGrowth. At the moment, I am trying to edit the main navigation. When I go to Structure->Menus->Main Navigation and disable the unneeded entries, they do not ...

1 2
3
4 5
32