Questions tagged [navigation]

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

513 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
0 answers
16 views

Debugging menu build up: Where can I find the build-up code?

I encounter problems with the menu build-up (performed during cache rebuild). In order to solve my own problems I would like to follow the build-up process using debug. Where is the build-up done, ...
Bart van Leeuwen's user avatar
1 vote
0 answers
745 views

Default menu.html.twig does not print below first level

Using Drupal 8, trying to integrate a custom theme we statically coded in house, and this is our first foray into Drupal 8. I copied menu.html.twig verbatim from the core directory into my theme's ...
nessthehero's user avatar
1 vote
1 answer
629 views

Load disabled items in a menu

I load my main menu programmatically with the following code : $menuTree = \Drupal::menuTree(); $menuTreeParameters = $menuTree->getCurrentRouteMenuTreeParameters($name); $...
kero_zen's user avatar
  • 121
1 vote
0 answers
278 views

"Link wrapper" for '#theme_wrappers'?

I would like to build a render array, where the children html is wrapped in a link element. I am looking for something similar to '#type' => 'container' to achieve this. So it would translate to e....
donquixote's user avatar
  • 3,622
1 vote
0 answers
437 views

How to add/ edit a node link pointing to a file url?

When rendering a node's links, I would like to show a link to a node's uploaded file instead of the read more link. I tried to replace: $links['node']['#links']['node-readmore']['url'] with the file'...
Alex's user avatar
  • 2,493
1 vote
0 answers
40 views

Management menu missing options

In the Drupal site I inherited, the Admin menu is missing both Modules and Appearance, making really hard to do anything. I've been tackling this issue periodically for months to no avail. How can I ...
Chelsea's user avatar
  • 11
1 vote
1 answer
39 views

How to customize the "Read more" link in D7?

By default, the "Read More" link wrapped in the tag <li>. How i can change this tag to <p>? I tried to use hook theme_node_view_alter(&$build), but i couldn't find in $build required ...
Byulent's user avatar
  • 121
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 ...
ProGrammar's user avatar
1 vote
0 answers
892 views

Insert custom html into menu

I am trying to insert the languageswitcher block and login block into the menu. So basically I am after inserting custom html into menu or change the html of a menu link. Looks like the best place ...
duru's user avatar
  • 599
1 vote
0 answers
72 views

Multiple instance of same block and contextual widget

I print the same menu twice in my region (to handle responsive design). Here is a part of my region--header.html.twig with my two topnavigation menus: <div class="header-main-top-wrapper"> ...
kero_zen's user avatar
  • 121
1 vote
1 answer
141 views

How to make node hierarchy with siblings and child pages

I want to make a node hierarchy menu which will display the child pages and siblings if child pages don't exist. I want to have the following structure parent child child child or parent ...
master's user avatar
  • 25
1 vote
0 answers
20 views

Convert existing link into node tab

I'm using Organic-Groups on my site and I would like to represent the unsubscribe from this group link as a tab after the View tab. I am using the following code: function mymodule_menu(){ $...
sisko's user avatar
  • 1,710
1 vote
0 answers
13 views

Menu Rendering before styles are applied. Webkit Browsers only, possible reasons why?

I am working on a project for a client. The site is large, with a lot of scripts and for non-disclosure reasons I can't add a link. The probably seems to be only in Webkit browsers. Before the page ...
Ian Taylor's user avatar
1 vote
1 answer
72 views

Can I add php code on title of a link?

I have this problem: I created three content types. Actor, author and musician. An user can modify own actor, author and musician profile, if his role is one of these. A user can have more than one ...
Germano Carella's user avatar
1 vote
0 answers
80 views

Sub-menu does not showing up despite "expandend" option is on

I have an menu that has some sub-menu: For the top option of sub-menu I've selected "expanded" option: My .twig for menu looks like this: {{ menus.menu_links(items, attributes, 0) }} {% macro ...
PolGraphic's user avatar
  • 1,100
1 vote
3 answers
1k views

Get URLs of taxonomies terms in Link field

I am having a link field in drupal 8. It can accept both internal and external links with autocomplete feature. But it works only with nodes means with content but i want to use it with taxonomy terms ...
Davinder Snehi's user avatar
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 ...
Jamie Sykes's user avatar
1 vote
1 answer
49 views

Using variables in Drupal

Would appreciate any assistance of how to handle configurable URLs for each environment. The links need to take the user to a different URL depending on the environment the site is installed in. In ...
mike's user avatar
  • 21
1 vote
0 answers
38 views

figuring out menu token path for file field

I'm trying to use menu token and file (field) path to get a path to display a node's PDF field from a menu link. I tried with the tokens: [node:field_pdf]/[file:url] with and without relative path ...
toy robot's user avatar
1 vote
1 answer
58 views

NL and other languages visible, but English site not visible and showing error after translating news item

I get below error when try to reach my site (see screenshot): The editor of the site made a news item and translated it to English. Now the English (default) site can't be reached. But the other ...
meez's user avatar
  • 1,333
1 vote
0 answers
58 views

theme_menu_tree override single link

I'm trying to override the HTML output of a single menu_link only when the user is anonymous. The following code is based on this by deskulu developers. function MYTHEME_menu_tree__secondary(&$...
Kropot's user avatar
  • 271
1 vote
0 answers
44 views

How to rearrange admin menu

I have made a few admin items for our site and we would like to collapse them into a series of nested menu options. I've found all our menu items, and changed the path to be nested properly. I've ...
spuppett's user avatar
  • 187
1 vote
0 answers
35 views

submenus not expanding some times

As the title suggests. We have a menu with several top level items and then sub-menus under each element. All the children for a given parent should expand when the parent is selected. It works... ...
tanbog's user avatar
  • 1,243
1 vote
0 answers
72 views

Rule: Auto Menu link for child via entity reference

I have child nodes which are assigned to the entity reference of the parents. I want to create a rule which assigns the child node menu items to the parent node menu link. I have many parent nodes, so ...
Meito's user avatar
  • 55
1 vote
0 answers
232 views

Change block configuration before render the block programmatically

I have a view that display some nodes and some of this nodes have a menu voice connected to them with sub menus. main menu: -node 1 [mid:407] --node 2 --node 3 -node 4 [mid:219] --node 5 I want ...
Shyghar's user avatar
  • 1,074
1 vote
0 answers
42 views

How to properly implement sections in site

I am about to create a Page with a Main Menu which is about three levels deep. Each item at the first level should divide the whole page into visual distinct sections. What would/could be the best ...
philipp's user avatar
  • 211
1 vote
0 answers
86 views

How can I add a (very) simple "Insert dialog" link?

I'm currently developing a social networking website and need a clean and simple editor for user content creation. I've choosen CKEditor (https://www.drupal.org/project/ckeditor) as it is integrated ...
Oleksandr Berezko's user avatar
1 vote
0 answers
33 views

Place and Style Menu

In D7 I could place and style a menu with a few lines in a mytheme_preprocess_HOOK function. for example: $variables['page']['navigation'] = array( 'section' => array( '#type' => '...
LittleCoding's user avatar
1 vote
1 answer
94 views

Inserting submenu to main menu using jquery - good idea?

I have main menu showing only first level links (3 items). **Home** **Themes** -green -blue -red **Jokes** -long -short -medium I am using Menu block module (to show second level items) + Power menu ...
loparr's user avatar
  • 916
1 vote
0 answers
384 views

How do I get a custom help text on a link field if title of the field is hidden?

I created a link field, and disabled its title, put some custom help text for the link field. It only shows the default help text underneath, like below but with no custom help text. Start typing ...
Mudassar Ali's user avatar
  • 1,079
1 vote
0 answers
20 views

Links in view do not lead to current language content

I have a Drupal 7.50 site with menu and content on the left side and a list of nodes on the right side. The Menu has a language switcher. When language changes the links from the nodes on the right ...
Tom's user avatar
  • 51
1 vote
0 answers
33 views

Entity Admin UI as Node Tab Link

I have an entity "metric" that has specified the following admin ui config: 'uri callback' => 'metric_entity_uri', 'admin ui' => array( 'path' => 'node/%/config', '...
NthDegree's user avatar
  • 111
1 vote
0 answers
35 views

Main menu level 2 template

I have my main navigation menu setup with 2 levels with only one level expanded by default. I then placed a second version of the menu in a different block and set the Initial Menu Level to 2 so on ...
chavab_1's user avatar
  • 305
1 vote
1 answer
109 views

If linking entities with a multi-value entity reference field, what about properties of the association?

In this thread I need a link from base table to join table it was suggested that it is better in Drupal to join two entities with a multi-value entity reference field than to use a relational style ...
Thomas's user avatar
  • 21
1 vote
0 answers
135 views

Empty parent menu item

I have created a new content type on Drupal and I chose it will be available in which menus. But when I add a content for my new content type and after I check the "Provide a menu link" checkbox, the "...
Ghassen Rjab's user avatar
1 vote
0 answers
78 views

css last clicked link menu/no menu

I have searched and searched and found many possible solutions but none of them work for me. I have a very odd website setup (the client wants it that way) Setup (all next to each other): Main menu (...
user61463's user avatar
1 vote
0 answers
57 views

Force all URLs to be absolute

I have installed the following modules: Pathologic Advanced Aggregation I implemented hook_link_alter() where I set $variables['options']['absolute'] = TRUE;. This helped with fixing: All links ...
user2670914's user avatar
1 vote
0 answers
868 views

How to create private links to unmanaged files ?

I have created my own module with custom block to display private downloads to authenticated users. The downloads files are provided by 3rd-party system and stored in private folder of Drupal ...
chrisb's user avatar
  • 11
1 vote
0 answers
36 views

No class="active" on just some Pages

I'm on Drupal 7.43 and are using Nice Menus 7.x-2.5. I just noticed a problem but can't say it is connected to Nice Menu. When I under admin/structure/menus manually creates menu links, not all links ...
hassebasse's user avatar
1 vote
0 answers
274 views

Problem with adding contextual link with option in yml file

In a custom module, I want to add a contextual link for all nodes, using the mymodule.links.contextual.yml file. It works well with a route without options: mymodule.test: route_name: entity.node....
Nicolas's user avatar
  • 11
1 vote
0 answers
21 views

Add content are not correctly re-parented

I decided to change Add content node/add/% from Navigation menu to Management menu. My prob is : Add a Content type Go to Add content and my new Add content's child link doesn't appear. It appears ...
guish's user avatar
  • 61
1 vote
0 answers
331 views

Change TB Mega Menu Dropdown to Toggle

I want to change TB Mega Menu Dropdown on hover to Toggle on click. I tried inserting attributes using this jQuery $("li.dropdown.parent > a").attr("class", "dropdown-toggle"); $("li.dropdown....
user81244's user avatar
1 vote
0 answers
121 views

How to show only top level menu name in Superfish

As seen "Departmental Information" is first level sub menu under top level "Staff Menu". But I want only to display "Staff Menu" and it should expand only on hover. How ...
user5858's user avatar
  • 255
1 vote
1 answer
757 views

Accordion is not working in field group module

I have configured the Field group module for Drupal 8 to manage the display of my node into accordion. I added an accordion wrapper, and assigned an accordion item into it. Lastly, added the fields ...
Pallavi Sugandhi's user avatar
1 vote
0 answers
44 views

How to get sub-menus of current node?

I have created a basic page - "About Us" and provided it a menu link under Main menu. Now I have created 3 more basic page as sub-menu of About us. So, the hierarchy is like: > Main Menu > &...
Sugandh Khanna's user avatar
1 vote
0 answers
77 views

How to use superfish on commerce kickstart

Anyone can tell me the steps needed to implement superfish on commerce kickstart 2.32 ? I have read this (Creating a menu while categorizing my products) but I failed.
fasisi's user avatar
  • 21
1 vote
0 answers
33 views

How do I create a menu based on 2 different vocabularies?

I'm new to Drupal 7 and I'm trying to create something simple but I can't work out how to do it. In short, I'd like to create a dropdown list within the main menu that shows all my venues categorised ...
user57517's user avatar
1 vote
0 answers
95 views

Views pager with anchor on another page?

I'm creating a page that have two sections, one with an image, as a "presentation", and other at the bottom that has a list, created with a View. That list have pagers created with the "Views Simple ...
xecollons's user avatar
  • 153
1 vote
1 answer
77 views

Alter main menu button text and URL path depending on OG Role

I know you can change menu links depending on drupal based roles (authenticated, non authenticated...) and by using Rules module also. I am using Organic Group roles and I am having difficulties in ...
qaz123's user avatar
  • 51
1 vote
0 answers
24 views

Views Accordion Closes When I Hit Next On Pager On Interior View

I have an issue where I have a view accordion and each row on the accordion has a view with a pager. When I hit next on the pager the accordion closes which is a very undesirable effect. Any ideas?
Evan's user avatar
  • 31

1 2
3
4 5
11