Questions tagged [navigation]
Use it for questions about navigation menus and links used in a site.
1,605
questions
0
votes
1
answer
757
views
How can I programmatically reorder active menu items?
I have an 'audience' menu which has 4 links. When a user visits one of these links, it becomes active, and I want to push it to the front of the menu item list. Outcomes would like like;
Pitchers | ...
2
votes
4
answers
4k
views
use-ajax class for ajax link not working in dynamic content load
use-ajax class link not working when i load new content using custom ajax code, which has the use-ajax class links.
I use normal jquery ajax to load the content because, i have drag and drop ...
0
votes
1
answer
418
views
How to make Adaptivetheme dropdown menu show on start page?
I'm using Drupal 8 with an Adaptivetheme subtheme. The horizontal navigation menu resides in the leader board region. Some menu entries have submenus, but they do not show on the start page. One has ...
0
votes
1
answer
67
views
Finding all nodes not referenced by a menu
I see this question was asked for Drupal 7, but the menu_link table doesn't exist in Drupal 9.
Is there a SQL query for listing all nodes that are not assigned to a menu?
1
vote
1
answer
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
2
answers
1k
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
2
answers
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 ...
0
votes
1
answer
380
views
How can i change RealName / User account link destination?
I'm using RealName module in D7 to show real names on nodes and in comments and would like to link the real name [user:first-name] [user:last-name] to a custom content type (a 'profile' page), instead ...
1
vote
1
answer
592
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 ...
2
votes
2
answers
76
views
How to show menu tab only for certain node type?
I have the following,
In the routing.yml
mymodule.cache_clear:
path: '/node/{node}/cache'
defaults:
_form: '\Drupal\mymodule\Form\APICacheClearForm'
_title: 'Cache Clear'
requirements:
...
0
votes
2
answers
111
views
menu.tree_storage service is missing from my site
I have upgraded my Drupal 9 site to Drupal 10.1.
One of my custom module uses \Drupal::service('menu.tree_storage')->loadByProperties(); which works fine in drupal 9.5.9, but I get the following ...
3
votes
1
answer
376
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
1
answer
1k
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 ...
3
votes
1
answer
1k
views
Providing menu route parameter values from url
Suppose I have the following route in my ej.routing.yml file:
ej.form.user.profile:
path: '/user/{user}/ej_profile'
defaults:
_title: 'EJ Profile'
_form: '\Drupal\ej\Form\User\ProfileForm'
...
0
votes
1
answer
674
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 ...
1
vote
1
answer
396
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
1
answer
31
views
How to get translated menu link entity
I have a headless Drupal 9 solution and I'm currently working on i18n of the whole site.
I've managed to do everything except menus. The content translation core module is installed and setup ...
1
vote
2
answers
391
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 ...
1
vote
1
answer
46
views
Custom Menu Template not Rendering Menu Links
I'm building a custom module that modifies the main theme (barrio bootstrap in this case) to establish a landing page. In that process, it hides blocks in some regions and takes over rendering the ...
0
votes
1
answer
482
views
Outputing the field as link doesn't properly show the field properties
I want to output an image field as a link in a view. 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 ...
0
votes
1
answer
484
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
2
answers
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
2
answers
528
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 ...
1
vote
1
answer
1k
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
1
answer
655
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
2
answers
492
views
Multiple aliases per node (and active trail)
Our site is split down the middle for tenants and landlords. But we have content the is the same for both such as "how to report antisocial behaviour".
User would normally navigate something like "...
1
vote
1
answer
684
views
Restrict Menu Item Visibility by Permissions
I have a module-generated menu (using yaml file) with 5 menu items. My requirements don't allow me to restrict menu item visibility by role because roles can be dynamically added. So I have to do this ...
1
vote
3
answers
870
views
Reorder Content Types in ("/node/add")?
In drupal 7 it can be do like this. 7 - Reorder Content Types in ("/node/add") - Drupal Answers
How can I reorder Content Types with Drupal 8?
0
votes
1
answer
470
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 ...
0
votes
1
answer
510
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
1
answer
695
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
1
answer
427
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 ...
0
votes
1
answer
539
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
1
answer
404
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
0
answers
18
views
Group and Group content menu
I'm trying to display menu from Group page. All is ok with the module Group content menu.
But when I'm trying to display the same menu on a subpage of the Group, there is no menu as if the context is ...
0
votes
2
answers
713
views
Add target="_blank" in menu items (main navigation)
I use Drupal 8.9.3 with custom theme. I need to do a menu item on the main navigation who go on an external link.
I would like to add target="_blank" on this link, but I don't see where I ...
1
vote
1
answer
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
2
answers
962
views
How can I add "data-target" additional attribute in mega menu?
How can I add an additional attribute to menu item I am using mega menu?
On element inspect my current menu url is displaying as :
<a class="we-mega-menu-li activeNav" title=""href="/clients/...
0
votes
0
answers
38
views
Menu links to media library items
Is it possible to link to media library items such as documents and images rather than be restricted to content nodes?
Fairly new to Drupal development and thought this would be fairly standard but ...
0
votes
0
answers
29
views
How can I extend the maximum number of items in a menu?
I maintain a website where a particular content type is always displayed with a left-hand navigation menu present. As part of the process for adding new content of this, the site editors add a link to ...
13
votes
4
answers
27k
views
How do I create menu links programmatically?
I need to add some links to existing menu (or to new) programmatically in Drupal 8.
2
votes
1
answer
694
views
Theme template.php functions after bootstrap
I'm trying to print a drupal menu outside drupal. In order to achieve this I ran the bootstrap as follows:
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
And I render my menu as follows:
public static ...
3
votes
2
answers
687
views
Link tags in template file auto closing.
I’m having an issue wrapping a link around some output in a template file. I have the right template file; and I can put text like ‘start here’ and ‘end here’ and it prints out where I want the ‘a ...
1
vote
1
answer
608
views
Load disabled items in a menu
I load my main menu programmatically with the following code :
$menuTree = \Drupal::menuTree();
$menuTreeParameters = $menuTree->getCurrentRouteMenuTreeParameters($name);
$...
0
votes
1
answer
751
views
How do I programmatically alter the links displayed in the main navigation menu?
The main navigation menu in the site I am currently working on has a lot of menus. I want to hide the disabled ones.
I figured out that it is rendered via the menu_edit_form form.
entity.menu....
0
votes
1
answer
463
views
Displaying parts of main menu in separate blocks
I need to display my main menu in separate blocks: the first sub-menu in one block, and the following two sub-menus in another block. I'm using Drupal's native menu module and also the nice menus ...
1
vote
1
answer
1k
views
Render Custom Menu Block from Menu Tree Array of Links Programmatically
Here's what I have: A custom menu (side nav) that mimics the main/secondary menu tree which shows the entire subtree of the root menu item (Dine, Play, Stay) you're under.
This sidenav can be ...
13
votes
6
answers
5k
views
How to display more than 10 items in link widget autocomplete?
This is a question about the Link module. Since with the Link module you can enter external or internal links both, we strongly rely on it.
Unfortunately the number of items to be displayed from its ...
0
votes
1
answer
602
views
Symbolic links and the file_scan_directory() warning
I wanted to use the following symbolic link in my root directory:
$ ln -s /data1/public/cases/ DownloadData
Such that when users go to www.example.com/~user/DownloadData/file they are rerouted to /...
3
votes
2
answers
1k
views
Show menu link descriptions for a custom navigation menu
I have the following navigation, displayed in page.tpl.php:
theme('links', array('links' => menu_navigation_links('menu-site-navigation')));
There are four navigation elements that show up. I ...