This tag is for topics related to the Drupal menu system.

learn more… | top users | synonyms

0
votes
2answers
14 views

How to add “publish content” to a node view tab

I'm developping a website where I'm asked to add a tab "Publish content" next to the Edit tab. I was told to use the hook_menu, but so far i didn't succeed in showing the tab. Here is what I have ...
1
vote
0answers
7 views

Unable to print menu links using menu_navigation_links

I'm using a custom template and attempting to customize the output of specific menu items. However when I attempt to output each link in the menu specified it outputs nothing. menu-it is the machine ...
0
votes
0answers
7 views

Menu issue on sitemap page

Here is my sitemap structure from my custom sitemap module in which 4 of my menus are displaying. But there are duplicate menu items under Products and About. I dont need MECHANICS, INDUSTRIAL and ...
0
votes
0answers
9 views

Font-Awesome issue: how to remove menu-link text from a menu item with font-awesome icon?

I installed the module Font awesome icons (with it's library) & the module Menu attributes; I've configured them, and now have a working font-icon in my main menu. The problem is that instead of ...
0
votes
1answer
7 views

How to add a menu to Drupal with all external links from module code?

I am writing a module that gets data from a couple sources, mostly XML, and then creates a nested array of values, such as "Title" and "URL"/link. I'd like to create a new menu and then loop through ...
0
votes
1answer
12 views

Unable to render menu in theme

I'm creating a custom theme in Drupal 7 but I'm having trouble getting it to render the menu I'm using the following code in page-front.tpl.php <?php if ($page['main_menu']): ?> <div ...
0
votes
0answers
25 views

Drop down of site pages for admin to choose

I have a content type which has a link (text type), and admin can manually insert his link. My site pages consist of the pages that work with views module (views page), and also pages that are ...
1
vote
1answer
21 views

Menu items visible based on checkbox

I want do show/hide menu items based on a checkbox that the user selects when he/she registers. I use profile2 for register. Should I use an external jquery script that calls on page load or should ...
0
votes
1answer
23 views

Custom 404 - menu disappears

I have created a custom 404 page using hook_preprocess_page(): function THEME_preprocess_page(&$variables) { $header = drupal_get_http_header('status'); if($header == '404 Not Found') { ...
2
votes
1answer
29 views

How to link (a menu item) to the RSS feed

In our Drupal installation there is a menu item for the RSS feed, pointing to path de/rss for the German feed. This path appears unchanged in the frontend and is invalid, hence results in a 404. The ...
1
vote
1answer
8 views

Add class to Menu Block UL unique to each Menu Block instance?

I've seen lots of answers, but they only allow you to add classes to all Menu Blocks, or to specific Menus. I have multiple menu blocks with the same menu behind them (1st level block, 2nd level ...
2
votes
3answers
25 views

Menus in drupal 7

In my sitemap, I am displaying main menu and footer menu, but as per requirement I dont want a specific menu item to display in sitemap. If my footer menu has following items: industrial mechanics ...
0
votes
0answers
16 views

New main menu item doesn't work

After adding new main menu item I received info that it is created, but it is not. I've check watchdog for some error - none. I've cleared caches. None. I've checked db menu_links - new items are ...
0
votes
1answer
35 views

How to create menu when dynamic routes [duplicate]

This link https://www.drupal.org/node/2122201 suggest us to make use of route_callbacks when we are using dynamic routes.Can someone tell me how to make use of this route name in *.links.menu.yml file ...
0
votes
1answer
24 views

Menu in Drupal8

I am currently using below code to generate routes: foreach($this->hardcopyEntityManager->getHardcopyEntities() as $entity_type => $entity_definition) { $route = new Route( ...
-3
votes
1answer
37 views

Menu for mobile responsive [duplicate]

Is there any recommended module for responsive menu? Example the picture above, click on it and a list of menu appear. Easy to configure. This content is for: many content Creating a responsive ...
0
votes
1answer
19 views

Page arguments - hook_menu

I have this two test menu items: $items['test/%id'] = array( 'title' => 'Test', 'type' => MENU_LOCAL_TASK, 'page callback' => 'drupal_get_form', 'page arguments' => ...
0
votes
1answer
45 views

Menu links for Dynamic path

I have created routes for several content entity making use of route built event in Drupal 8 and now I want to create menu links for the same routes. I searched several places but couldn't come up ...
1
vote
2answers
16 views

Print Main Menu inside a block

Very new to Drupal--trying to understand building a dynamic navigation menu for end users to handle. Is it possible to print the Main Menu inside a block I'm using for the header? e.g. <nav ...
0
votes
1answer
17 views

Menu and breadcrumbs

I need the menu bar and breadcrumbs to use different hierarchies. Specifically, I need the menu bar to have: Home | Projects | About | Contact but I need the breadcrumbs for a project page to be: ...
1
vote
1answer
19 views

Configure main menu on a multilingual site

I have set up multilingual options on my site, and have a lot of pages in two languages. One thing I can't work out is how to have a different main menu for the two languages. Under ...
0
votes
1answer
16 views

Autopopulate a node with the content of a menu

supose i have a site with three nodes of basic page type called "element 1", "element 2" and "element 3". I want to create a menu with the following structure: -elements --element 1 --element 2 ...
0
votes
0answers
11 views

multilanguage active trail menu anchors

I use the Unikue theme for drupal but I have a problem with the class w--current in the menu. As you can see on my website website i have an nl and fr language installed. So there are 2 menu’s one ...
0
votes
0answers
12 views

Menu Bug in Drupal 7.35

I'm running into this weird bug in Drupal 7.35; when I try to save a menu item as a child item, it sometimes works and sometimes doesn't. Attached is a video of the behavior. ...
0
votes
0answers
25 views

How to make administration menu display child links without child url

My question is probably a little confusing, so I'm gonna explain with an example. Whenever I create a parent link like "admin/test/execute", the administration menu will display the link and if I ...
0
votes
0answers
12 views

Set menu active trail on a non existing menu link?

As the title says, it is possible? Thing is im using menu_block module to render different levels of a single menu but i want to maintain the active trail even so the url has change. Example: ...
1
vote
2answers
19 views

Active a menu <li> when the menu entry is a view page

I have a section (call news) that have an "home page". This home page is created via "views" and via "views" I have insert a link item into "main menu" menu based on path (/news). When I go to /news ...
0
votes
0answers
16 views

Limit the menu level on node add/edit page

On node add/edit page we have a menu settings option. This option by default show all the nodes in the main menu under Parent Item tab. Is there a way we can limit the nodes in the menu(under parent ...
0
votes
0answers
15 views

Sub Menus are not getting Added

We are using taxonomy menu module to create main menus. Sub menus we are creating from Main Menu -> Add Link. The Problem is that sub menus are not getting added and it shows below response. Also ...
0
votes
0answers
24 views

How can I programmatically check which section the current node is in with Workbench Access?

I've been scouring the Workbench Access and Workbench Access Menu modules to figure out how I can get the section assigned to the current node. I know that the menu item gets its section assignment ...
-1
votes
0answers
26 views

Custom menu in drupal 7

Following is the code for my custom menu but it is not showing its child items. Here menu-second is my machine name for custom menu $second_menu = menu_navigation_links('menu-second'); ...
1
vote
0answers
11 views

links__system_main_menu in drupal not gettign called

I created a theme and the theme name is abc. I am trying to override the default menu in drupal. I have the following filed in the theme folder (folder name is abc). abc.info file and page.tpl and ...
1
vote
0answers
11 views

Include custom menu in (mini)-Panels Everywhere

Converting a site from regions/blocks to Panels Everywhere: in my page.tpl.php I have a menu system like: <div class="menu_wrapper"> <nav id="main-menu" role="navigation"> <a ...
0
votes
1answer
28 views

How do I add a menu task to /node path?

I want to add a custom tab after "Edit" but can't figure out how to do so. I added a mymodule.links.task.yml file entity.node.import_form: route_name: entity.node.import_form base_route: ...
1
vote
0answers
8 views

Views menu options moved to top of structure menu, no obvious way to move them

I had a funny thing happen, where the views menu options got moved to the top of my structure menu in the admin panel, specifically the "add view," "add view from template," and "import" are all at ...
-1
votes
1answer
19 views

Difference between DRUPAL_CACHE_PER_PAGE and DRUPAL_NO_CACHE

What is the difference between DRUPAL_CACHE_PER_PAGE and DRUPAL_NO_CACHE? I'm developing a module that will generate 2 blocks for menu and it's sub-menu in different blocks and can't decide between ...
1
vote
1answer
42 views

User login link is always visible in menu

I have created user login link in the user account menu but the link is visible all the time(even for logged users). The user profile menu link and the user logout links are displayed properly(they ...
0
votes
0answers
31 views

Organize categories and subcategories of products in menus

I have product content type that I want to display in a menu. Every product belongs to subcategory that belongs to main category, for example: Computers: PC: - product 1 - product 2 ...
0
votes
2answers
26 views

Menu Link issue [duplicate]

If I dont want to give a path to menu link because it has children that are expanding on hover. But there is no option for no path, I tried by assign <none> but this is not valid too.
0
votes
1answer
34 views

How do I add a menu item to the main navigation from a custom module in Drupal 8?

For my custom Drupal 8 module I want to add a link to the default main navigation menu of the site. What parent ID do I have to give to insert my menu item into the main menu? I currently have the ...
0
votes
1answer
22 views

Region not rendering on views page but works perfectly on regular pages!

I have a navigation_bar region set up in my .info file which renders perfectly on regular drupal pages but I have two pages which are made from Views, but nothing renders. I am using the superfish ...
0
votes
0answers
18 views

Check if menu link is translated

How can i check programmatically if menu link is translated without using tsid to load all translations from database ?
0
votes
1answer
20 views

Creating menu items for views during installation of a custom install profile fails

I have created a custom installation profile in which I enable some default features and modules. In the profile I added an extra task at the end in witch I enable a custom deployment module. That ...
0
votes
2answers
54 views

Add attribute to main memu item

In my project I would like to add the following attributes to my "Login" main menu item: data-toggle="modal" data-target="#login-modal" (Am using the Bootstrap theme) I checked out the menu ...
1
vote
1answer
45 views

Anyone know how to build a menu like this? [closed]

We are redesigning a site for a client and they're wanting to create a menu similar to the one found here (the big menu below the header, not the hamburger menu at the top left): ...
1
vote
1answer
34 views

Is there a module for automatic menu translation?

I need to automatically translate menu items into all enabled languages when created. Is there a module for that or how can I do it programmatically ?
1
vote
1answer
29 views

How can I create a menu item corresponding to a link to another (external) site?

In my menu I can create an internal link corresponding to a path like → '/path/to/node'. But when trying to create a link to an external website (like → http://www.external.com), the link actually ...
1
vote
1answer
96 views

Adding a “three line” character (☰) or image to TB Mega Menu dropdown button

I'm currently developing a website with TB Mega Menu using a Zen subtheme. The problem is that the default TB Mega Menu button (the one that replaces the 'normal' horizontal menu on smaller screens) ...
0
votes
1answer
24 views

How to theme main menu in three columns

I have a main menu block which i am showing at top-navigation. I need to theme main menu but not sure how to apply classes to the root level menu items and sub menus. i tried below snippet but not ...
0
votes
2answers
15 views

Creating A Submenu In Drupal

Hello I Am New to drupal and i want to create a submenu bar under Menu Navigation So Can ANYONE Suggest And Idea Or Something To Create A Submenu In Other Page Like Shown On Image