Questions tagged [routes]

Using a term introduced in Drupal 8, routes are the paths to which modules respond.

Filter by
Sorted by
Tagged with
0
votes
2answers
220 views

Can I change the default tab at /admin without losing access to /admin/tasks?

Below I have changed the default tab at /admin to /admin/index, but now /admin/tasks is 403. Even if I change $items['admin/tasks']['access callback'] to TRUE I'm still denied access. function ...
0
votes
1answer
41 views

Create a menu under a menu?

I am wondering if there is a way to have a menu under another menu in Drupal 7. Let's say I have a new menu called Blah and I want it to appear under the main menu item Top. So I would end up with ...
0
votes
0answers
66 views

Translating of menu item creates new menu item

I have installed these modules concerning menu translation: Entity Translation Menu - entity_translation_i18n_menu Menu Translation - i18n_menu For now, when I translate a menu item, a new - ...
0
votes
0answers
113 views

How to execute a flag after uncollapsing/clicking a (block) item?

I have this code working as a dropdown menu block that shows user's notifications, with a notification count item to its right: <div class=notiwrapper> <?php global $user; //We get the user'...
0
votes
1answer
38 views

Manage main menu in module

I have a series of sites that use the same theme. What I'm looking to achieve is to manage the main menu (or a standard menu) via a module instead. Reasoning: Most of these sites will have the menu ...
0
votes
0answers
155 views

How to string-override main menu items?

String Overrides is working perfectly for built-in Drupal output such as admin menu links, and for custom code that uses t(). However, it doesn't work if I try and override text in the main menu ...
0
votes
0answers
141 views

Open nodes from menu in ajax mode

I have a custom module that shows node in ajax mode with hook_menu() . how can i show nodes from menu in ajax mode . here is my code : <?php /** * Implements hook_menu(). */ function ...
0
votes
0answers
163 views

Create a symbolic link in the main menu

I have a node "Contact page" and a menu link called "Apply". "Apply" is a menu child of "Contact". Put another way, "Apply" appears on the second level of the main menu under a menu link called "...
0
votes
1answer
77 views

How to take contents of a tab and insert them inside a node

I guess this is a pretty basic Drupal thing, but I'm not experienced with coding. I am using the Petition node module which displays a petition form and the results of that petition inside a tab on ...
0
votes
1answer
873 views

How to add active-trail class to a links in a view?

How to add an active-trail class to all links in a view, which a parents of a current page (according to a result of menu_get_active_trail())?
0
votes
1answer
508 views

Permission for translating menu items via the menu config screen

I have a multi language Drupal site, Using i18n and the entity translation approach. Translating menu items from an node works well, but not all the menu items are driven by the nodes. Now as user/1, ...
0
votes
0answers
112 views

Secondary menu shows for registed users only

I have created a theme from scratch but secondary menu show only two items for non logged users but show all of them in logged users. Also this menu has sub items but it won't show at all, whether for ...
0
votes
1answer
125 views

Role based menu redirect

Setup: I have a main module (called public) and several sub-modules that extend the support offered by the public module. A sub-module (let's call it sub) functions can be accesed only by users with ...
0
votes
2answers
1k views

Custom template for custom page in custom module in D6

So I know there is a way to specify a custom template for custom content types etc, but if I have a custom module where I am using hook_menu() to add custom pages with a page callback function, how ...
0
votes
1answer
218 views

Cached taxonomy menu block problem?

I created a taxonomy menu block based on a vocabulary I have. It didn't work how I wanted so I removed it. I have created a view (page) that has the same URL as one of the links in the taxonomy menu ...
0
votes
2answers
2k views

Display content by taxonomy term, including sub-terms

I'm looking at Drupal for the first time in a long time, with a view to using it in a project we're starting. This seems like a very simple question, but I'm struggling to find the answer. If we have ...
0
votes
0answers
61 views

Customize CMS menu

I have created a menu from the Drupal CMS (admin > structure > menu). Now I want to change the title of the same programatically. Is it possible, if so how? I have tried hook_menu_alter, ...
0
votes
1answer
2k views

Trying to get fullPage.js implemented, but how to add data-attributes?

This is such a great script called fullPage.js I managed to load the js file and css file and even with the Void Menu Module, managed to call anchor links, but I'm struggling with the data ...
0
votes
0answers
84 views

Main menu does not display on pages with a specific path

Having a really frustrating problem with my Drupal site. On pages that have a specific path the main menu block does not load. For example I have the path.. meet-our-derms/bios meet-our-derms/test ...
0
votes
0answers
235 views

How to change #theme function of specific menu items?(not all of them)

In my site I have a menu array that is printed in my page via drupal_render function. I checked the array via krumo()* function and I found each item (link) has a property names '#theme' with value '...
0
votes
0answers
125 views

Link for a specific role to add content

I have created a menu for a specific role, how i can add a link, so the role could create content ?(I dont want this role to have administration menu, just a normal menu).
0
votes
1answer
680 views

show custom menu in page tpl file

<?php if (isset($custom_links)) { ?> <div id="secondaryNav"><?php print theme('links', $custom_links) ?></div> <?php } ?> I've create a custom menu (machine name: menu-...
0
votes
1answer
418 views

Entity reference of a menu link gives Restricted access instead of the real data

I am trying to create an entity reference of a "menu link", but instead of having the menu link name I got "- Restricted access -". It seems to be the same problem with wysiwyg profile. I'm using the ...
0
votes
1answer
49 views

Is there a way to dynamically apply a CSS to a menu that includes the taxonomy term of the current page

For example, if I have page nodes with a vocabulary called "issues", which has terms, such as "budget", "education" and "foreign policies", and there's a menu titled "Information", I want to be able ...
0
votes
1answer
192 views

Administration Structure to list menu items fails to display

When I access admin/structure/menu/manage/main-menu this should show a list of all of the menu items and enable re-ordering, enabling, etc. This has stopped working and will only display the top level ...
0
votes
1answer
389 views

Why does hook_menu add my menu items multiple times?

I'm using a hook_menu to add some custom menu items to my user menu. One is a link to an external page, one is a duplicate of the "node/add/discussion" page. I'd expect these menu links to be added ...
0
votes
0answers
751 views

Sub menu not displaying

I am using bartik theme but my sub menu is not displaying , this is my menu code , <div class="navigation"> <a href="#" class="mobile-nav-icon">Menu</a> ...
0
votes
1answer
82 views

Taxonomy, views and menu

I have a content type "basic". That content type is using 3 taxonomy vocabularies. Vocabulary 1 - 5 terms Vocabulary 2 - 3 terms (term1, term2, term3) Vocabulary 3 - 6 terms I have a view that ...
0
votes
1answer
253 views

Create a menu block based on path using views

I'm trying to use views 3 to create a view that I can place in a block that is based on the url path For example example.com/student/ example.com/student/page1 example.com/student/page2 example.com/...
0
votes
1answer
232 views

How to scrape specific elements of the Drupal theme to a file?

I want to save two divs - one with the site header and the other has the main nav menu - to a PHP file that can be used in other (even non-PHP) sites to replace their header and menu using Javascript ...
0
votes
1answer
103 views

Issue with menu caching in Drupal 6

I have implemented hook_menu_link_alter so that a menu link is altered for some authenticated users, but not for all. My implementation of hook_menu_link_alter changes properties of the link (HTML ...
0
votes
2answers
414 views

Altering the type of a menu item to local task (tab)

I've searched for hours but I can't find a good answer on how to alter the type of a menu item to local task (tab). The private messages 7.x module (when aided by privatemsg_filter) exposes the ...
0
votes
1answer
34 views

How to display a menu items for a node but not for it's parent

I have a page which I don't want to appear in a menu unless the user is already on that page or a child page underneath it. For example on a shopping site, I would like to have a 'special offers' ...
0
votes
0answers
573 views

multi column drop down menus

Is there a menu module through which we can create multi column drop down menus. I have tried TB Mega Menu which gives the desired result but it has some issues. The worst part is that it converts ...
0
votes
0answers
194 views

URL path to view with certain filters selected is altered by Drupal when used as a menu link

I have a view with different filter options. I need to create some links to the view that will automatically select certain filters simply by following the link. If I copy the url created on the ...
0
votes
1answer
419 views

Creating some views fields for a taxonomy menu with the active trail CSS classes?

I have a taxonomy vocabulary which I want to use to create some navigation on my site. Terms: Weather Clothes Calendar Sports I want to be able to pull these terms and put them in the navigation ...
0
votes
1answer
30 views

alter the 26 (A-Z) parent links so that just the menu link text is displayed without its associated hyperlink

Within Drupal 7 I have created an A-Z menu which contains all the links on the site organized alphabetically. In addition to these links I have 26 additional parent menu links (A-Z) from which all ...
0
votes
0answers
56 views

How do I let the user create a custom menu in a node?

On all my pages there is a side bar menu acting as a node/page specific menu. Typically I would create an entity reference field and let the user choose menu items that way. Then I'd use a view to ...
0
votes
1answer
45 views

Sidebar formatting issues

The Drupal 6 website I am working on is giving me some problems with the sidebars. Here, my 'general info' sidebar is incorrectly showing 'home' sidebar info. To the right is my 'divisions' sidebar ...
0
votes
1answer
134 views

Render menu in custom form-api module

I've created a custom menu from the drupal admin panel, and have a custom module that uses drupal's form API. I'd like to render the custom menu in this module. Since this is using form API, I don't ...
0
votes
2answers
387 views

How to avoid url conflict when defining menu items, and make sure path without wildcards will be used in favor of path with %?

In hook_menu, I have $path = "events" $items[$path] = array( 'title' => t('Events'), 'page callback' => 'my_events_page', 'access arguments' => array('view my events'), 'type' => ...
0
votes
0answers
184 views

How to set a newly created node's menu parent based on selected taxonomy term?

I am using the module taxonomy menu which autom. created menu items for each term of my vocabulary. Now, when I create a node and save it, I dont want the author to have to select the term AND set the ...
0
votes
1answer
431 views

Unable to get through to the custom form using hook_menu page callback?

Inside the hook_menu I have , $items['abc/def/%node'] = array( 'page callback' => 'drupal_get_form', 'page arguments' => array('heart_form',2), 'access arguments' => array('...
0
votes
1answer
76 views

footer link to a page with hash changed content ready

I have set up the pages like this (using some php and jquery): On this page, I have some tabs, using jquery to hide and display the content on click each tab. The url will change to #this_tab_name ...
0
votes
1answer
2k views

How to disable the Superfish Accordion?

Is it possible to disable the superfish accordion 'main menu' link at the smaller responsive sizes? Instead of clicking on 'main menu' to see the navigation, I would like the navigation to already be ...
0
votes
0answers
536 views

What does “path has not been overridden because the menu item does not exist.” mean

I've noticed the following error message in a few different situations. Path has not been overridden because the menu item does not exist. Cases in witch I have seen the error message Trying to ...
0
votes
2answers
90 views

E-mail results from page callback

I have a menu hook and page callback which takes several arguments to generate some table data in a page, the page makes heavy use of entityfield_query and some other modules. I need to be able to e-...
0
votes
1answer
129 views

Multiple rendering causing a ul more

I had following code in template.php this is in function bartik_process_page(&$variables) $main_menu_tree = menu_tree_all_data('main-menu'); $variables['main_menu_expanded'] = menu_tree_output(...
0
votes
1answer
79 views

“Add link” attempt for a Menu yields 500 error

I have tested with fresh installs of Commerce Kickstart down to version 2.6, the error happened. I even disabled all modules related to the Menu module or with menu in the name, no luck. I also ...
0
votes
2answers
520 views

Correct way to create Departments/Categories cck selectors in Drupal 7?

1. My Scenario: I'm building a shopping cart and using Ubercart+Drupal 7 for it. Manufacturers will be able to log in and create their own products with Product attributes {Name, SKU, price etc} ...