Questions tagged [navigation]

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

Filter by
Sorted by
Tagged with
1
vote
2answers
2k views

add link in Colorbox caption

In my gallery, what i write as image title is the caption of my image and that is great. Now I would like to add a link (external url) to my caption, how can i do that? I already try to write normal ...
1
vote
1answer
1k views

Transfer (export/import) url aliases and menu links automatically

I want to transfer/synchronize url aliases and menu links from one site to another. Is there any way (drupal module, drush command, script) to do it automatically? The module menu_import looked ...
0
votes
2answers
996 views

Problem with menu position module

I have a menu like this: In the first sidebar you see the main menu with links. The second sidebar is a block that is visible on pages that begin with stocklijst/. The link in the first sidebar ...
1
vote
1answer
442 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'...
5
votes
2answers
7k views

How do I get the absolute URL when using l()?

I want to get <a href="http://site.ru/node/123">New product</a> from l(), and I call it as l('New product', 'node/123'), but this function generates a URL that is not absolute. How can I ...
3
votes
1answer
863 views

Taxomony menu - show all, vocabulary link are disabled

I have a custom vocabulary which looks something like this: Shops (vocabulary name) Sporting Goods Auto Parts Computers Etc. (15 items in total, 1 level) My goal is to create a menu link to Shops ...
0
votes
0answers
35 views

Create multiple Menu blocks from the same menu

In Drupal 7, the Blocks page contained a link for 'Add menu block', from where you could create multiple menu blocks of the same menu. In Drupal 8, menu blocks seem to be generated automatically, ...
0
votes
0answers
17 views

Recreate the Management menu during migration

I've just done the upgrade from Drupal 7 to 8 (on a site that was updated from Drupal 5 to 6, 6 to 7...) and the management menu seems to be a bit of a mess. An attempt at trying to fix it up left it ...
1
vote
2answers
181 views

How to increase book weight range for a same-level chapters

I have a book of 33 chapters. These chapters are numbered with roman numbers: Chapter I, chapter II and so on.I'm a blind user, so I can't use drag & drop reorder. In Drupal 7, weight range is -15 ...
0
votes
2answers
73 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 ...
1
vote
1answer
568 views

Missing bottom level item when a node is linked to two menu objects

I have been trying to create a custom menu block which shows a number of menu items with images on the current level. I am having an issue where the active trail array doesn't return an menu item for ...
1
vote
1answer
452 views

How to tell if a menu link is route:<nolink> or not?

Trying to theme a menu in Drupal 8, running into a case where we need to add classes on certain links. In the case of a menu link that is route:<nolink> we need to not add any class at all. ...
2
votes
1answer
1k views

How can I modify the Quick Edit Module to have a better UX for end-users?

For a current project I'm working on we're trying to leverage the "In Place Editor" functionality provided by the Quick Edit module. Our main goals are to: Have a module that allows us to perform ...
3
votes
1answer
2k views

Why does jQuery slideToggle revert back to initial hidden state after running?

I have a Superfish menu and a simple jquery slideToggle animation attached to each menu item. I am using Drupal 7 & the Superfish module. The idea is that on click it will show the body content ...
0
votes
1answer
4k views

How to add image field to main navigation menu item

I am having a problem using MYTHEME.theme file to add image field in the menu item object. I need to be able to specify an image for each menu link/item! function HOOK_entity_base_field_info(...
3
votes
1answer
201 views

How can I remove all contextual links?

When using the layout builder module, the contextual links module is a hard dependency. This works quite well in the context of the layout builder. But I don't want those links anywhere else, because ...
0
votes
2answers
2k views

How to add active class to title which is loaded via views in block

I have created content type XXX, via views I collected all titles of XXX content. That all titles works as links, I want to add active class to title which was clicked in block. It should works as ...
0
votes
1answer
566 views

All added links open as target, how to prevent it?

In my Drupal based website, all links that I added from CKeditor open as (target="_blank" Link example: (<a href="node/add/name">Name</a>) After adding, example from html source: (<a ...
0
votes
0answers
25 views

Menu link Converting full URL to local

When I save a menu link pointing to a node (nid 5, alias /woohoo/magic/test, it's value in the database is: entity:node/5 I'm trying to convert fully formed user inputs such as "http://127.0.0.1:...
0
votes
2answers
1k views

Links on site adding index.php in URL

I have a Drupal 8 site and am encountering an issue. When I visit the site as an anonymous user and click a link on the menu, it adds /index.php to the url. Then if I navigate to that page and click ...
48
votes
12answers
81k views

How to get the valid URL of a Link field from within a Twig template?

I have a Link field named field_my_link (machine name). Within a Twig template I can get the link's URL value with this: {{ node.field_my_link.uri }} If inside the Link's URL there is an external ...
0
votes
1answer
453 views

How can I increase the 128 character limit of a menu path?

I know there are patches to core, but they were never backported to Drupal 6 from what I can tell. Increasing path length to 255 chars Menu path length is limited by the UI to 128 characters How ...
0
votes
0answers
13 views

Large menu management options

I have a site with about 800 pages in the main menu. When creating or editing a node, managing the menu item parent can be challenging with a select list containing so many options! I am using Big ...
1
vote
1answer
771 views

Content edit links?

I'm new to Drupal 8 and can't figure out a way to show the edit contextual links for content displayed through the Views module. This was simple in Drupal 7, but in Drupal 8, a view only shows the ...
0
votes
1answer
859 views

How to get menu title inside menu--main.html.twig file

I created a suggestion for menu and using menu--main-sidebar.html to render menu. I want to include menu title (title of block added to specific region from admin side) as first child of menu I ...
1
vote
1answer
27 views

Disable menu link for certain languages

I'm looking for a way to disable a single link in a menu for a certain language. From my understanding with similar issues, I'd like to activate translation for the menu link field Enabled since this ...
0
votes
1answer
498 views

Menu block makes parent menu item active when maximum levels not cover the linked node

In Drupal 7, a menu block can specify maximum levels. If the maximum levels is not enough to cover all menu items linked node, when in the not-covered menu items linked node, could menu be active at ...
0
votes
1answer
31 views

Create a View Block that shows a taxonomy vocabulary applied to the current node

I have a news section of a Drupal 8 website that contains an ever-growing list of nodes. To avoid a messy menu in the long term, they do not have a menu position assigned but instead are shown via ...
0
votes
0answers
26 views

Using TB Megamenu, how to close one submenu when I open another submenu?

I'm building a couple of (Drupal 8.9.13 and Drupal 9 based) sites where I use TB Megamenu megamenu module (https://www.drupal.org/project/tb_megamenu) to create the menu. All is working fine on ...
3
votes
1answer
367 views

How to pull pictures and summary information from external web pages when posting links?

When posting a link (external web page) to my Drupal blog, is there a way to have Drupal automatically pull the picture and summary information from that link and include it in the post on my Drupal ...
0
votes
2answers
436 views

Filters as rewrite results link path parameters

I am currently using this approach to link lists view's rows to detail pages in Drupal 8 I would like to pass the entity title of the row to the receiving page and use that to select view blocks ...
0
votes
1answer
580 views

How to get Tb Mega Menu working in Chrome?

I have a website and integrated Tb Mega Menu for the navigation. But the problem is my dropdown is not working in Google Chrome, though it is perfectly working in Internet Explore, Mozilla. My version ...
1
vote
1answer
544 views

Group by taxonomy headers

Not sure why I can't do this as it sounds simple, I have: A content type called 'RSS FEEDS' A vocabulary called 'Publications' within this I have 3 terms which are 1) NY Times 2) BBC 3) National ...
1
vote
2answers
370 views

login_destination module and link with anchor

I want to to use login_destination module to have a link to login screen in comment-wrapper.tpl.php, so after the login, the user came back to write the comment. I have installed and configured ...
0
votes
1answer
602 views

Adding class to nested UL in menu

I'm creating my menu using view along with Bootstrap to create a mega menu style navigation. I'm having a problem with the nav showing expanded at times when you come to the site and or refresh. not ...
0
votes
0answers
15 views

Add Image to parent item smartmenus

I have created a dropdown menu using smartmenus module, now I've got a design request asking me to add an image to each parent item. Here's the idea: My first approach was to try with Menu Items ...
1
vote
1answer
403 views

How to add subtitle for menu items in Nice menu in Drupal 7

I'm using nice menu in my durpal-7 site.I need to show a subtitle for each menu item.How can this be done ? I'm new to drupal so it would be great if you could help me.
0
votes
1answer
530 views

Fatal error while editing and deleting menu items

Facing one issue in deleting the menu items on my Drupal 8 Site. Steps to reproduce: Add a link to main menu. Create Child terms under one link. Delete the parent term. After deleting the parent link ...
0
votes
1answer
379 views

No working link to network files

For an intranet solution I would like to add a bunch of rather static links in Drupal to network files which change from time to time and are maintained by people not using Drupal. To achieve this I ...
2
votes
1answer
38 views

How to properly check the menu for emptiness in twig?

I use Simplify Menu to display the necessary menu markup. How do I make sure that the menu is not empty (there are items there) and if there are menu items, they are enabled? {% set items = ...
0
votes
1answer
341 views

View button that links to current node

I'm trying to create this button in my views with a custom text, that needs to link to the current node. I know you can use links and that works, but.. i need something like a variable that makes the ...
0
votes
1answer
500 views

How to set the link in a view slideshow?

Currently, I'm creating a xyz resort website. In my home page, I implemented a slideshow by using views. I want the slideshow to be clickable: When I click on to the resort image in slideshow it ...
0
votes
1answer
453 views

Accordion display for views inside panel

I have a panel page which contains 2 views. I only want 1 view to display as an accordion. My problems are - If I set the style setting of the view to accordion - nothing happens. If I set the style ...
0
votes
1answer
10 views

Sub Menu items not showing

I am trying to create a navigation with a sub-menu in Drupal 9. I added the top level nav item with and used # as the value for the link, and checked "Show as expanded" Then I created a new ...
6
votes
4answers
9k views

How do I programmatically update or delete menu items?

I have seen the post on how to create menu items programmatically in Drupal 8, but how do I update or delete menu items in D8? Clarification: by programmatically I mean dynamically so yaml config ...
0
votes
1answer
469 views

Views : Output the field as link - not showing the field properties properly

I want to output an image field as a link in views. I've seen many tutorials but get stuck at one point. I already added the link on top of the image field. By clicking on the image at rewrite ...
2
votes
1answer
1k views

Add classes to the menu item <li>?

In hook_preprocess_menu(), I want to add custom classes to the <li> tag. I tried the following lines of code, one at a time. $item['attributes']->addClass('section'); $item['attributes']->...
0
votes
0answers
19 views

Inject a custom menu to the Administration menu

In Drupal 8 I would like to inject a menu at the first position of the Administration menu So that an editor can create a navigational structure for all users. So I would create a "Custom Admin ...
1
vote
1answer
1k views

Menu theme suggestion ignored when cache turned on

I have an alternative main menu that is used on specific node types. When turning on the cache the menu block is cached. The theme suggestion for the menu is then ignored. I tried to disable the menu ...
0
votes
0answers
33 views

How would I create and render, but not save, an entire menu tree programmatically?

I'm trying to pull a number of links from several services, and combine them into a renderable menu tree: Source one: pull links A, B and C Source two: pull links D and E Source three: pull links F, G,...

1
2 3 4 5
32