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
941 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 ...
0
votes
2answers
400 views

Customising user profile tabs

I've customised the user profile tabs to look like a dashboard by using the generated classes and styling them using just CSS. Just to be clear, I haven't used any hooks or preprocesses to render the ...
0
votes
0answers
31 views

Drupal menu don't show up when menu based on token menu are fired

I have a menu in a drupal site. All elements was visible until I install "menu-token" module and make two elements based on tokens. Now when I visit a page linked to a path that point on a views page, ...
0
votes
0answers
109 views

current_path() inside theme_menu_link returns previous path

I am trying to hide/show menu links based on my current page. I have added the following snippet into my template.php file under mytheme folder. /** * Implements theme_menu_link(). */ function ...
0
votes
1answer
135 views

Display a Menu and Submenu as tabs

I have a simple 2 level menu like this: Category1 Link1a Link1b Link1c Category2 Link2a Link2b Link2c I'd like to create a tabbed Menu/Submenu for this: When Category1 or any of it'...
0
votes
2answers
63 views

Translate links in Drupal menu page

I have a maybe rather silly question. I have a test website and a live website (both Drupal 7) In the test website I have setup translations for my main-menu using the module "Menu Translation" (it ...
0
votes
0answers
83 views

how to extend a custom module

I am writing 2 modules, one dependent on the other and both extend the user profile page. The first one is order_history and the other one order_details. The concept is order_history pulls out a list ...
0
votes
0answers
256 views

How can I add a menu link on the right side of my menu bar while having the main menu on the left side?

I have a menu bar displaying the main menu on the left side and I would like to add a link to user account on the right side (right corner). I am using the TB mega menu module. Any idea of how I could ...
0
votes
1answer
87 views

Hook path in main menu not hold active trail

In custom module names supply_area I've created custom path. function supply_area_menu() { $items['supply-area'] = array( 'title' => 'Supply area', 'page callback' => '...
0
votes
1answer
108 views

Calling menu in a certain way from page.tpl.php

My menu structure looks like the structure in the left part of the image. I want the output to look like the right part of the image when I'm in the 'oranges' page for example. This works great if ...
0
votes
1answer
39 views

Get full expanded menu?

How can I render out my main menu as entirely expanded? I am working on mobile navigation and need to have the entire tree rendered out in my code for this to work the way I want it to. I do not want ...
0
votes
1answer
73 views

Active menu for a node with two different terms

I have a node which has two different terms. The problem is when I'm on such a node, the active menu and breadcrumbs point only to one of the terms. How can I find a solution to this problem without ...
0
votes
0answers
589 views

I'm getting 'page not found' when trying to access my custom module

I am working from a pre-existing Drupal 7 install. I downloaded the source files and downloaded a dump of the DB. When I first installed Drupal worked fine. I built a custom module, it was working ...
0
votes
2answers
161 views

Localize views menus links

I need a way to localize menu Items pointing to Views in a menu that has field translation. I cannot create them neither from views nor manually (weird access denied messages). EDIT: Here ...
0
votes
1answer
96 views

Menu Block disappear when changed the access control permission

I have "Menu Block" and "Content Access" modules installed. The menu button of that page disappear when I set that page not to view by "anonymous user". How can I show the Menu Block to everyone but ...
0
votes
0answers
85 views

Make hook_menu() argument as global variable

here's the code from my module: function vasya_init() { // ajax framework drupal_add_library('system', 'drupal.ajax'); drupal_add_library('system', 'jquery.form'); } function vasya_menu() { $...
0
votes
1answer
40 views

How do I make link act like a view or a view look like a link?

Good morning! I want to create a link that displays a node, the most recently created for example. What is the best way to do that in Drupal? I have a menu link that does what I want with: ...
0
votes
2answers
222 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
42 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
67 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
156 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
167 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
78 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
877 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
512 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
85 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
685 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
420 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
193 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
391 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
1answer
83 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
254 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
239 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
104 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
420 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
575 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 ...

1 39 40 41 42 43 45