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
1answer
79 views

Factors regarding menu visibility (menu is missing on access denied)

I've built a theme based on Zen starterkit, and recently noticed that my main menu is not rendering on any access denied pages (non-admin role obviously), however, the remaining content is rendered as ...
0
votes
1answer
77 views

How to hide blocks based on menu_name

I've a site with a main menu, and submenus as block. If I'm on node "50" I want to hide every submenu, except the submenu with the link to node "50". Question: How can I hide a block based on it's ...
0
votes
1answer
553 views

node translations and too many menu items

I use Drupal 7, locale and the i18n modules. I've setup a mini site with node translation. I have the following EN nodes: node/1 About node/2 Terms node/3 FAQ node/4 Contact and the following FR ...
0
votes
1answer
62 views

Need block content for each menu items

I need to have a separate block for a each menu items in my menu (Add item section).Is there any drupal module can help me or i should write the custom module.Please suggest the possible ways to do.
0
votes
0answers
1k views

Sidebar doesn't show up

I've an problem displaying my sidebar... I've build a custom block which has these settings: And for display options, I've choose these: But for some reason, the block doesn't appear in my sidebar ...
0
votes
1answer
1k views

Setting a default value in views jump menu d7

I followed a tutorial on how to use the jump menu functionality in views drupal 7 link http://dev.nodeone.se/node/771,it was successful. i have one problem though,I need to show a default value(for ...
0
votes
1answer
50 views

Trouble making dynamics links

I have two dynamic links that I want to put in a block, e.g. http://example.com/series/bomberman-jetters/node/add/gallery/82 ("series" is the content type, and "bomberman jetters" is the node title), ...
0
votes
0answers
279 views

Create dynamic links in block

How do you create a block with multiple dynamic links? If the url is http://www.domain.com/series/bomberman-jetters/node/add/gallery/82 then the 82 is varied depending what node your viewing. Also ...
0
votes
2answers
169 views

Added a secondary link through code. Why is my href URL getting decoded?

Added the following through code: // $uri = custompath?type=All&field_id=2&storage=3 $secondary_links['menu_custom_item'] = array( 'attributes' => array( 'title' =...
0
votes
0answers
45 views

Menu's disappearing [duplicate]

Possible Duplicate: My horizontal navigation menu disappeared This is a new version of a previous question that shriveled up and died without a an answer. Issue still remains with just some more ...
0
votes
1answer
53 views

Long form links in an “overview page”

I have a drupal project with a hierarchical page structure. On each category page (top level), I'd like to have a blurb about the category, and then a series of links to subpages, where each link has ...
0
votes
2answers
423 views

I want to make node views “Edit link” field as a menu

Is it possible to make "Edit link" field as a menu. On my site one user can create only node and I have a page view which displays the node the user logged on has created. This views has a "Edit link" ...
0
votes
1answer
232 views

How to remove a menu path defined in hook_menu from naviagtion

I've added two paths for use my my module (for OAuth authentication), but I don't want them to appear as links in menus. I tried defining their 'type' as MENU_CALLBACK but they still appear. Is ...
0
votes
1answer
120 views

Presenting a menu within page content with associated descriptions and images

Currently, I have a drupal project where I have two levels of menus. (So for example, the top menu has "home" "about us" "faq" etc.) each top level menu has a secondary menu. I'm trying to create a ...
0
votes
1answer
195 views

A menu block won't show up for second language

I have 3 separate menus in my header. They are not connected. I don't used secondary menus. My site is bilingual: english + spanish. All 3 are created using menus and placed in the same region using ...
0
votes
1answer
818 views

Setting menu trail of subpage of a node

I'm trying to have a subpage for a special content type. Everything is working fine, also the breadcrumb is working now. Only the active menu trail isn't showing up and I really don't know how to ...
0
votes
1answer
1k views

D7: jQuery script for creating 'active' links in menu system. (partially works)

This is such a pity D7 does not have by default active links sets in the menu system. I mean everyone likes to have a clue where he is in the site by the active state of the menu. I wonder why there ...
0
votes
0answers
145 views

Prevent Menu Items from being deleted or moved

How can I prevent certain menu links (i.e. Home, About, Contact) in the "Home » Administration » Structure » Menus" section from being deleted from a menu. I want to prevent clients from deleting the ...
0
votes
3answers
1k views

Hide a menu item for admin user

How can I remove a menu item when admin is logged in? I used the following code but it doesn't seem to work. function mymodule_menu_alter(&$items) { $items['item_x']['access callback'] = '...
0
votes
1answer
61 views

Where DHTML Menu link's title is getting printed

I would like to replace the title attribute of DHTML menu's link with a javascript tool tip. But i could not find the place where the link attributes are printed. ie. where test is mentioned. ...
0
votes
1answer
791 views

Accidentally Deleted Admin Menu Items

Hi i hope someone can offer me a bit of advice here. I seem to have deleted all my admin menu items. Is there a way to restore them without losing any data on my site? thanks
0
votes
1answer
2k views

Secondary Menu Tab (local task)

I was wondering if there is any good documentation out there on building second level tabs using the menu system. Here is some of the menu code in my module: $items['admin/settings/cvminterviews'] =...
0
votes
2answers
155 views

Content Type admin-side UI

I have a custom content type which has grown in fields count and all that UI hints and stuff. It now takes about 4-5 screens to scroll. I was wondering if anyone knows of a module/way that allows to ...
0
votes
1answer
110 views

Suggestion tpl help for NiceMenu markup?

I'm using NiceMenus to display my taxonomy tree. Since I chose no parent menu, the module displays the root items as separate hoverable menu "tiles", which is OK. They are however <li> items ...
0
votes
2answers
56 views

Main Menu Tab Help

I am able to add a new tab in the Drupal Main Menu however I only want it to display when a user logs in. In other words this tab should not appear on the site until a user is authenticated. Thanks
0
votes
1answer
358 views

Want to add tabs from /user/* pages to other pages

When I go to any "user" pages on my site in /users/* I have menu tabs for the various pages in that section, like below. I want to add the top level of tabs to another set of pages. Specifically, I ...
0
votes
2answers
298 views

how to overreide page.tpl.php with my custom menu

I have override page.tpl.php with my new custom menu created in my custom module. my menu look like below $items['node/edit/restaurant/%/barcodes'] = array( 'title'=>'Barcodes', 'menu_name'...
0
votes
1answer
513 views

Styling Menu Mini panels

I'm having an issue with styling my menu mini panel hover. Here's the site with the megamenu I'm working on: http://drupal.scienceworld.ca As I'm rather new to JS, I was wondering what the best way ...
0
votes
1answer
691 views

How can i use main-menu items as a fields in selectbox in drupal 7

Helllo, I have a content type called "Lookbook" in that i want to put one field like "Lookbook For" and this field content select box and main-menu items. I have main-menu list but I want only display ...
0
votes
2answers
165 views

Site architecture - consistent paths, breadcrumb and menu

We've been trying to implement a site architecture that has a consistent menu, breadcrumb and path structure for all pages in the site. This is easy for basic pages since the path can be set using ...
-1
votes
2answers
88 views

Full urls to internal pages logging users out

I have a website with a private area for authenticated users only. I have some custom routing to control user access and it generally all works fine, however, I have run in to a problem I am not sure ...
-1
votes
1answer
302 views

Hook_menu_alter not working?

** * Implements hook_menu(). */ define('RATE_PATH_RESULTS_PAGE', 'node/%node/rating'); function rate_menu() { $menu = array(); $menu[RATE_PATH_RESULTS_PAGE] = array( 'title' => 'Voting ...
-1
votes
1answer
797 views

Clear cache routing.

I follow topic to create dynamic routes. Examples i have a form, when user click submit form. new route will be created. It's working. But after clear cache by UI (or function drupal_flush_all_caches()...
-1
votes
1answer
30 views

Is it possible to create a menu item with first argument as wildcard?

I have created a menu item using hook_menu() with the following structure.Unfortunately, when i access the given link, it returns not found error? Can anyone give a solution for this? $items['%/...
-1
votes
1answer
33 views

problem getting hook_menu() to work

I want to display a button on the front page of my website and for the first time (as beginner), I wanted the link to be configured in the administration page. I followed the tutorial on creating a ...
-1
votes
1answer
46 views

Drupal 8 module - page errors out

I have a drupal 8 sandbox site where I have started a module. I am practicing with registering paths. on my /tweets page, it errors out and says "Drupal has encountered an error". What is wrong with ...
-1
votes
1answer
376 views

Prevent inheritance link color secondary menu [closed]

I'm creating a lay-out for my website with Zen in Drupal 7. I want links in the body to be red and bold, so I customized the normalize.css file: a:link,a:visited { color:#990000; font-weight:bold;...
-1
votes
1answer
969 views

i18n 1.4: Use of undefined constant MENU_PREFERRED_LINK [closed]

Has anyone run into trouble following i18n update to version 1.4? My site crashes badly with multiple notices about use of undefined constant MENU_PREFERRED_LINK. This is caused by Menu translation ...
-1
votes
3answers
70 views

Question on Site Structuring

In Drupal 7.x, is there a general rule on creating the page hierarchy? I'm porting over an old Joomla 1.x website to drupal, and the site index is pretty big with about 6 levels, and a lot of it ...
-1
votes
1answer
46 views

Error with Event Subscriber using getRouteName()

I have a problem with event subscriber. Here is the error: The website encountered an unexpected error. Please try again later. Error: Call to a member function getRouteName() on null in Drupal\...
-1
votes
1answer
564 views

change an add entity route to a custom route in order to not use admin theme

I will start off by saying i have already studied these posts, to no avail: Overriding an entity add/edit form through alterroute How to load my Entity in Entity form https://www.drupal.org/docs/8/...
-1
votes
1answer
35 views

Missing title in template for custom route

I'm missing a title (_title) being shown on a custom route page. I wonder where i can place it in a template for it to show up. My route: bg_helper.blogs_overview: path: '/blog' defaults: ...
-1
votes
1answer
47 views

Changing the routing class is throwing an error

I am trying to change my UserLoginForm class to iLibUserLoginForm with the following code. namespace Drupal\ilib_sso\Routing; use Drupal\Core\Routing\RouteSubscriberBase; use Symfony\Component\...
-1
votes
2answers
684 views

Retrieve argument in hook_menu() item url

On my custom module, I defined the following hook_menu() function. function motel_events_menu() { $items['ajax/pastevents/%'] = array( 'title' => 'Get Past Events', 'page ...
-1
votes
1answer
944 views

How to expand TB Megamenu in opposite direction so it won't go outside of the site?

I am using TB Mega Menu for my drop down menu that has three columns with width: 665px and height: 335px. I want to do something like this: There are total 8 menu tabs. When I click on first 6 menu ...
-1
votes
1answer
312 views

Passing parameters to route

So currently i am passing some params to a form via the route path as so: my_module.action: path: '/status/{action}/{id}' defaults: _form: '\Drupal\my_module\Form\MyForm' requirements: ...
-1
votes
2answers
29 views

Put a Form in the Site's Homepage

I have the item menu in my hook_menu. //Calls a function that enables creating, updating and deleting ID Templates. $items['user/%user/myid_templates'] = array( 'title' => 'MyID Templates', ...
-1
votes
1answer
64 views

how acces admin theme without /admin in url?

I try to have an admin theme for admin user and custom theme for user logged in without /admin/.... in the url. I create an entity content module, the routing is like that : # AnnonceEntity ...
-1
votes
1answer
408 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 ...
-1
votes
1answer
209 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 both ...