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

learn more… | top users | synonyms

1
vote
0answers
18 views

Only show menu level 2 from active trail (with option Show as expanded)

I'm trying to do something pretty basic in my perspective, but I keep failing at this simple task. My website has a main menu that is displayed on top of the page that is 2 levels deep (hence the ...
1
vote
1answer
14 views

Most maintainable way to make page with one top half and alternative bottom halves selected by tabs?

I want to make a page which has one top part, a row of two or more horizontal tabs beneath it, and alternative bottom parts which appear beneath that and can be selected by clicking on the tabs. For ...
-1
votes
2answers
17 views

Error message - Trying to get property of non-object

i'm getting a notice Error message - Trying to get property of non-object here's my function: <?php function func() { $node = menu_get_object(); global $user; if ...
0
votes
1answer
9 views

Programmatically render menu on search view

I'm trying to programmatically build a menu on my site, it works fine on all pages except a search view. This code I'm using is below: $config = array('menu_name' => $menu_name, 'level' ...
1
vote
0answers
18 views

override the HTML of a single menu block

Good day all. I'm new to drupal, and I could use a little help. I got the override idea, and I try to stick to this, now, I have a menù, on the upper part of the site, that needs a different HTML ...
0
votes
1answer
19 views

Menu access callback function called multiple times

I have following menu defined with access callback function. As You can see this is a hack so I can use REST via GET ( normally Services do not offer this ). All my endpoints are defined ...
0
votes
0answers
18 views

Using active trail as url path

I Would like to use the active trail menu as url path by altering pathauto? Can this be performed ? thanks
0
votes
1answer
14 views

Get an item in a list of taxonomy

Hello Drupal Community, I am creating a menu which has a link to an "editorial". I created a taxonomy named "edito" and created articles (content type) that are tagged with this taxonomy. I need to ...
0
votes
1answer
22 views

How to always print submenus from menu module?

I'm using Drupal 7.35, with the stock menu module. I've set up a menu that has multiple submenus, and ran into something interesting: the submenus only are printed to HTML when you're on that menu's ...
2
votes
1answer
32 views

How programmatically assign selected menu to superfish menu…?

In my custom theme there is an option to choose navigation menu and type of navigation menu (TB Megamenu and Superfish Menu) from a select list in theme settings page. In my tpl file am able to pass ...
0
votes
2answers
29 views

Trying to add a class to a menu in a preprocess function

I want to add a class to a menu - doing it in hook_menu won't work because I'm adding an icon with the icon API, and this seems to override any classes put on the menu items. I have this preprocess ...
0
votes
1answer
13 views

Trying to pass icon into the menu

I am trying to use the icon API to pass an icon to the menu - I would use the icon menu module, but I want the icon to switch based on programmatic logic. Here's what I have so far: /** * ...
0
votes
0answers
12 views

Numbering nested menu levels

I've got a custom function which overrides the menu links for a specific menu so I can put my own custom classes into it (see below). function MYTHEME_menu_link__menu_footer_links_1($variables){ ...
0
votes
0answers
10 views

How to delete a node in menu system when user updated a specific content type article

I have built a content type and some taxonomy There is a problem in my site for now if I selected taxonomy one my node will become to the taxonomy one children in the menu system and if I edited the ...
0
votes
1answer
13 views

Trying to create a custom menu link in a menu

So I want to have different menu links depending on if a user has received a message or not. I make a hook_menu() instance, like this: /** * Implements hook_menu(). */ function MYMODULE_menu() { ...
1
vote
0answers
22 views

Menu on mobile phone - How to directly show second level of menu?

Following configuration: Drupal 7, tb corpal theme, superfish menu For mobile phones I get a menu as shown in the image. If I press the menu icon (1, red on image) I get first the "Main menu" level ...
0
votes
0answers
8 views

Custom Breadcrumb from nested menues?

I'm using Custom Breadcrumbs in Drupal 7 to build a breadcrumb structure that follows my nested menu structure. Seems fairly typical. However, I'm stumped as to what Tokens to use when there is an ...
2
votes
1answer
15 views

Edit specific menu items in template

In my theme I'd like to have complete control over my menus. I'd like to apply specific classes and wrap the menu however I like. I was thinking I could do this within a template. I see that you can ...
0
votes
1answer
27 views

Why does node/%node/random/stuff work?

I just noticed this, and I can't find an explanation. I can go to node/1/45645645/klzkelfkzlef/47z4e5fz56e4f/etc and it'll just show node/1 instead of a 404 page. The same happens with ...
1
vote
1answer
22 views

How to get main menu to highlight the link to the current page?

My theme, Riley, highlights menu item of the page that you're on. (for example). I suspect this is a function of Drupal and not specific to the theme. First question: is this generally true? If the ...
1
vote
1answer
20 views

“add content” suddenly not showing on navigation block anymore

Good day, I'm having a problem of a block not showing its content! the block is stock and called navigation, which has "add content" in its links. but just recently, it has not been working on other ...
0
votes
1answer
41 views

Configure Menu Access Visibility and permission

I have a question for Menu Visibility. I have an entire live site in production. I am trying to build editorial workflow for my editors, other editors and approvers. I am using Workbench Access and ...
0
votes
0answers
30 views

Can menus be auto-generated from discovered content?

I am considering Drupal to host technical manuals. Aspects: the manuals change frequently I would bulk update the pages via curl, ftp, or some other method to be determined (point being: there will ...
1
vote
1answer
154 views

Use hook twice in a single module

I have created a custom module with some inc files for different functionalities, these inc files adds config pages for admin but i had to define all urls in .module file. is it possible to use ...
0
votes
2answers
25 views

Add Html code to Menu Title in Bartik

I am trying to add my own image menu names (I prepared png files) instead of menu titles (Navigate, Category, Home etc.). How can I do this? Which files should I need to check? I know Html Menu module ...
-1
votes
1answer
55 views

Off canvas menu for drupal 6

Are there any modules for Drupal 6 that provide an off-canvas menu? My site has mobile users and I want to hide the navigation bar when they view it. I want something like this: I have searched ...
0
votes
0answers
24 views

Accordion Menu - jQuery seems to stop working on product page

for several hours I'm struggling to cope with the Accordion Menu in my webshop (Drupal Commerce). Here's the story... In my webshop, beside the default content types (Article and Basic Page), I have ...
0
votes
1answer
24 views

Render a custom menu in a custom block

I want to create a block that contains somes links of a menu, without using the interface. So I created a custom module. Inside, there are somes files. a mymodule/test.links.menu.yml : ...
0
votes
1answer
16 views

How to get rid of auto generated classes in secondary menu links and add my own classes

I have taken the standard code for secondary menu from a Drupal 7 theme: <?php if ($secondary_menu): ?> <?php print $search_form; ?> <?php endif; ?> ...
0
votes
1answer
11 views

Can I call menu_rebuild() only for one module or specific hook_menu?

Is there a way to call menu_rebuild so it will only update items in selected module and / or hook_menu ? I need it to update links ( if they are already existing ) and add new ( if they are now ). ...
0
votes
0answers
5 views

How do I alter the URL of a primary_links menu item in drupal 6?

I have already tried doing this in theme_preprocess_page() in template.php and this works if I output the array to the browser but the menu itself remains unchanged. I have also tried using ...
0
votes
0answers
23 views

Link menu item to network path

I am trying to figure out a way to allow content editors to add menu items that link to Windows shared drive, example path: file:///w:/documents/001.pdf Any ideas how to best do this in Drupal 7?
0
votes
1answer
17 views

Print current drupal menu level

Hitting my head against the wall here. I've volunteered to print a list of the current menu items (at the same level as the currently viewed menu) print theme('links', $secondary_links, array('class' ...
0
votes
4answers
112 views

Correct way to add language switcher to a menu

I'm trying to add a language switcher to one of my menus using the hook_preprocess_page(): function <MODULE>_preprocess_page(&$variables) { // append language switcher to top_menu ...
1
vote
3answers
35 views

unable to link my custom content type nodes to a menu I created

I created a custom content type (pics). I can add this new "pics" content to my site (and if I want to, it can appear on front page, but I don't want to...) with no problem. But I would like those new ...
0
votes
1answer
18 views

Why are my menu items not showing under the top level menu item?

I'd like my other 3 menu items to sit under Manage Instagram in my Admin/Config menu but they are all being created as individual top level menu items. function instagram_menu() { $items = ...
2
votes
2answers
39 views

Categorizing Content

I want to have a drop down field available so that when a content author (user) creates a new page, they can select which section of the website this new content should get placed. For example, my ...
1
vote
1answer
37 views

tb mega menu is not showing in bootrap theams in drupal7

I am new user of drupal 7.3. I am using bootstrap 3.0 theme in drupal 7.3. I am using tb mega menu which is not showing. Black color box will be occurred in navigation block. Please help me to ...
0
votes
1answer
18 views

How to add a complete menu as an item in other menus?

Let say I have 3 MENUS: MENU 1 with these items: item menu 1 - a item menu 1 - b item menu 1 - c MENU 2 with these items: item menu 2 - a item menu 2 - b item menu 2 - c MENU 3 with these ...
0
votes
1answer
37 views

How to add extra class in main menu in drupal 7

Here, I working in creating custom theme in drupal 7.I am struggling to create main menu with drop down.Here i create menu with custom code is <?php $main_menu_tree = ...
0
votes
2answers
39 views

How to convert drupal 7 hook menus to Drupal 8

I am having site built in Drupal 7 and in future I want to migrate my site to Drupal 8. How can I write hook_menu() and hook_menu_alter() hooks of Drupal 7 to routing.yml files of Drupal 8
0
votes
0answers
103 views

Parent menu display submenu rather reload the page

Hi I installed a bootstrap theme in drupal 7. I had a requirement to bring hover support to drop-down menu and make parent menu clickable to display its own content. I acheive this through some css ...
0
votes
1answer
44 views

Pathauto like pattern setting for creating menu link titles

Pathauto is great, in that it allows you to set the URL alias of a node to some pattern like '[node:menu-link:parent:url:path]/[node:title]-DEV' for DEV content type. I am trying to build a single ...
1
vote
1answer
19 views

Proper approach for showing menu based on node

I'm setting up a new Drupal site and created a content type, taxonomy, and two menus. The taxonomy just has 2 items, which correspond to the menus. What I'd like to do is render the corresponding menu ...
0
votes
1answer
21 views

Custom menu link does not show up under “List links” but is in the database

I have three menus with six links each using the i18n module. All of these links are to panel pages. On one menu, however, there is an additional link to another custom panel that does not appear in ...
0
votes
1answer
39 views

Drupal shortcuts - link with question mark included

When I add a link to shortcut set which looks like this: admin/work?date_filter shortcut module changes this question mark sign "?" into this "%3F" and this link doesn't work anymore. I believe I ...
0
votes
0answers
20 views

how to hidden a taxonomy menu item use hook?

I have built a web site which has a content type call product and product taxonomy product taxonomy has sat a boolin function makes user select to show up for anonymous user or not If the user ...
0
votes
0answers
9 views

Custom menu-items permissions are erased when features are refreshed

I am using D7.37 with features 7.x-2.5 and Features Tools 7.x-2.x-dev (2014-Nov-27). I have 2 environments (dev, prod), and I use git and features to sync. After I refresh features and download to ...
0
votes
1answer
17 views

Vanishing Blocks/Menues

I have a legacy site running Drupal 6.19, and today, I found out that the entire side bar had disappeared. I haven't run any updates, and no administrators have been on the site for a while, so I'm ...
0
votes
2answers
35 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 ...