Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [routes]

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

3
votes
0answers
52 views

When a path is associated to more routes, which route is used?

How does Drupal 8 decide which route to use, if there are two routes defined in Drupal 8 via routing.yml that lead to the same path? Of course this sounds like a stupid idea or like a mistake in code ...
3
votes
0answers
118 views

Detail page route gives error

In my_module.routing.yml my_module.detail: path: '/module/{id}' defaults: _controller: '\Drupal\module\Controller\DetailController::view' requirements: _access: 'TRUE' In template twig ...
3
votes
0answers
40 views

How allow users to add menu entries only in second level?

i want my users to be allowed to add links only to the second level or lower of the main menu, but not to the first. How can i do this ?
3
votes
0answers
146 views

How do I ensure active menu items are highlighted for Views with Better Exposed Filter arguments

I'm using Better Exposed Filters on a clothing site. There are various types of products listed using Better Exposed Filters (to choose between Mens/Womens/Kids). The Mens and Womens pages are ...
2
votes
0answers
449 views

Tell taxonomy links to use route in custom module

I have a module where I created a route /page/tag/{term} that uses a controller for modifications to how the term page is handled. The problem is that when any page displays these term links, they ...
2
votes
0answers
56 views

Why would routes lose their aliases?

I have experienced this twice now on a Drupal 8 site. Pathauto is at its current version and Drupal is 8.2.6. What is happening is sometimes nodes 'lose' their aliases and revert back to being node/...
2
votes
0answers
320 views

Taxonomy name as path parameter

In my module, I have defined the following route: custom_module_page: path: 'new/post/{term-id}' defaults: _controller: '\Drupal\mymodule\Controller\myModuleArticleController::content' ...
2
votes
0answers
42 views

How to create a megamenu where not all the text is links, and where layout is more varied than just N columns throughout

I want to create a mega-menu with the same kind of layout as the table below, where the plant names are links but the classificatory headings are not: Ferns Bracken Conifers Fir Yew Pine ...
2
votes
0answers
219 views

List records in table and on click display details in form

I created a website which has two menus in it. One is to enter details of a person and the other to view list of entered persons. Here is the code function agents_menu(){ $items=array(); $items['...
2
votes
0answers
353 views

how to set parent div to get responsive multilevel menu

i am newbie to drupal, now I am trying to get responsive menu style through this module ResponsiveMultiLevelMenu(codrobs)(http://tympanus.net/Development/ResponsiveMultiLevelMenu/), but i dont know ...
2
votes
0answers
134 views

How to reorder Book module menu through Database?

How to re-order Book menu faster, optionally through Database? I have a big problem to reorder menu/ navigation for Book module.... It is supposed by drag-and-drop - I have 318 items in list , some ...
2
votes
0answers
1k views

Why is my Menu Router being rebuilt on every request?

I have inherited a Drupal 7 site, and it is running quite slowly. After enabling the Devel Query output, I noticed (not that it would be hard or anything) that there is a 65ms query DELETE FROM ...
2
votes
0answers
74 views

Render a children node inside its parent

I'm looking for a very specific behavior. I need to display every "node's children" inside its parent. This behavior needs to be effective when the node displayed is at level 4 or below. The hierarchy ...
2
votes
0answers
414 views

Menu_block module on dashboard gives notice error which won't go away

I'll installed the drupal block_module on my website, it works perfectly. Yesterday i decided to add this same block_module to drupals dashboard. Then all suddenly i got the following errors. I iknow ...
2
votes
0answers
1k views

Callback with node ID in Quick Tabs

I am planning to use Quick tabs, and it has one neat feature to use a menu as a callback and it prints the content returned from it. But How can I use the callback to pass NID so that I can return ...
2
votes
0answers
451 views

What causes localized_options on a menu link to be set to (boolean) FALSE?

I'm having a problem with one of our existing Drupal 6 websites where if you go to Build > Menu > Primary Links it causes 500 error. The error message is: Fatal error: Unsupported operand types in /...
2
votes
0answers
47 views

Permission by role troubles my buttons

I got a menu with sub-items members of the Role X. When a anonymous user visits the page, he can't see the menu. When the user logs in, he is able to see it. How can I keep menus visible to everyone ...
2
votes
0answers
334 views

Workbench access - how to limit which which menus user can add to

I have a workbench workflow system that's setup using a taxonomy to manage the sections. Is it possible to restrict which menu items a node can be added to, depending on a user's section. Even ...
2
votes
0answers
99 views

Menu Wildcard Argument Displays in Breadcrumb

So, I have a menu setup in my module like the following. I have omitted most of the definition parameters to be brief: $menu = array( 'admin/config/people/MY_MODULE' => array( 'type' =&...
2
votes
0answers
768 views

In hook_menu `page callback` function is executing twice

In this menu My page callback function is calling two times. In get_mydata function a fetchthedata function is calling which takes long time to run. It was perfectly fine earlier. But now it is ...
2
votes
0answers
319 views

Problem with main menu background color

I'm almost new with Drupal . so far i could do almost every thing i wanted by customizing the Bartik theme . one problem i have right now is to change the main menu color "when selected". It has the ...
2
votes
0answers
85 views

User Specific Pages -but only editable by admin?

I couldn't figure out how to directly address my situation. I've created a website and I would like to be able to create user accounts for my clients from which when they log in the main menu will ...
2
votes
0answers
87 views

No display changes from hook_menu_get_item_alter()

I have a string of subsites that need very special menu handling, beyond the normal menu router capabilities. I need to decide in real time (absolutely real time, thus no way to store it in the ...
2
votes
0answers
131 views

Drupal 7, generalizing a view to use as a link in a menu

I have 2 content types "Project" and "Document" and 2 Taxonomy vocabularies of "Document-types" (ex: calculations, reports, etc.), and "Projects" (the project names "alpha", "beta", etc). All ...
2
votes
0answers
160 views

Page disappears after enabling/disabling module or after clearing all caches

I have a page provided by Views (no custom coding). After I enable/disable any module, or after I clear Drupal caches, this page disappears. When I go to this view configuration page, hit any field, ...
2
votes
0answers
356 views

How do I set up the active primary menu based on taxonomy?

I have set up a blog using a custom Article content type and a page View with a row style of fields. I have set up taxonomy terms to label my Article content types as I make them. In my View I have ...
2
votes
0answers
301 views

How to avoid taxonomy terms other than current language terms in taxonomy menu?

Vocabulary settings: Per language terms. Different terms will be allowed for each language and they can be translated. I translate one term to other language (different than default), but this term ...
1
vote
0answers
34 views

Add routing config via admin UI

I have a Drupal site with a specialised search query page that accepts about a dozen arguments as URL query parameters, most of which are optional. Simplified routing YML file looks like this: ...
1
vote
0answers
70 views

How do I set a url query parameter node/{node}/edit for a specific content type?

I'm trying to add a taxonomy term from the node in question as a url parameter, but am struggling to figure out how to do it without just going through the site and modifying all of the links that ...
1
vote
0answers
34 views

Use a route with an id to mimic a node type but pull from a third party source?

Is it possible in Drupal 8 to create a route like /events/{id} with a controller, and in that controller make a call to a third party API to fetch data and then send that data to a template? It ...
1
vote
0answers
254 views

Routing with optional parameters for webform is just giving page not found

I created my webform to accept parameters via a standard $_GET and this works fine but is quite unsecure I am told and should rather use clean URL's via Drupal 8 built in Routing. As such I set up a ...
1
vote
0answers
95 views

Redirect After Creating New Taxonomy Term

I am new to Drupal. I am trying to figure out if it is possible to redirect back to the Taxonomy page right after adding the new vocabulary term instead of being directed to the manage page of the ...
1
vote
0answers
300 views

One route, multiple controllers

How can I go around having a single route that would internally be forwarded to a controller depending on some internal logic. I've looked into dynamic routes but it doesn't help since the route is ...
1
vote
0answers
20 views

User is able to see a inaccessible link

I had created menu link using hook_menu $items['admin/config/xyz'] = array( 'title' => 'xyz Webservice Settings', 'description' => 'Configures the xyz Settings', 'page callback' =&...
1
vote
0answers
472 views

Link to user edit form within a GUI made menu

I have a menu created through admin/structure/menu. I would like to add a link to the logged in users edit profile. I am attempting to do this via module.links.menu.yml but it is not working. The ...
1
vote
0answers
29 views

Issue with Configuration & Menu

I am trying to add a section to the configuration page using hook_menu and add a single entry in the section. Two modules, the first defines the section on the configuration page. /** * ...
1
vote
0answers
20 views

Add content are not correctly re-parented

I decided to change Add content node/add/% from Navigation menu to Management menu. My prob is : Add a Content type Go to Add content and my new Add content's child link doesn't appear. It appears ...
1
vote
0answers
36 views

How to get sub-menus of current node?

I have created a basic page - "About Us" and provided it a menu link under Main menu. Now I have created 3 more basic page as sub-menu of About us. So, the hierarchy is like: > Main Menu > &...
1
vote
0answers
86 views

How to use a link in Main Menu to switch language of current page?

Now I have three links to switch language on Main Menu: http://www.example.com/en http://www.example.com/de http://www.example.com/it The problem is the above all links to the <front> page. ...
1
vote
0answers
15 views

Menu tabs disappear if clicking on custom tab

I am adding a custom menu tab to a user profile. That works fine, but once I click on the tab the other menu tabs (edit, view, etc.) disappear. How can I keep the other menu tabs? function ...
1
vote
0answers
105 views

ParamConvert in RoutetSubscriber::alterRoutes()

In Field UI RouteSubscriber we have this route: $route = new Route( "$path/fields/{field_config}/delete", array('_entity_form' => 'field_config.delete') + $defaults, array('_entity_access' =&...
1
vote
0answers
44 views

Altering menu item title results in access denied message

Problem: When I try to overwrite the title of the edit link of a an entity built with ECK the page responds with an access denied message. Background: I have an entity built using ECK. I am ...
1
vote
0answers
67 views

nodes exist in database and “page not found” - drupal6

I have a drupal6 site and have a content type "resource" with more than 500 nodes. there are some nodes "almost 15 nodes" from this type of "resource" when open it tell me "page not found", also when ...
1
vote
0answers
226 views

Alter the menu item markup

I am trying to achieve is move active class from element to parent element, this should be possible to do in .twig template (I wouldn't like that) so how to get menu in Drupal 8 and alter it's ...
1
vote
0answers
15 views

Menu block Issue while using with multiligual i18n module install

I've installed the Menu block module (to display 2-level menus in page side bar etc) and the Internationalization module to create a multilingual site. But when I translate the content in other ...
1
vote
0answers
51 views

Render webform node on page callback with view, edit, webform, result tabs

I have a setup where I direct authorized users to a profile2 page or render a webform to anonymous users, using page callback in hook_menu_alter . I want the admins to be able to access the webform ...
1
vote
0answers
35 views

Drupal 7 - i18n menu item langcode

Hello i have multilingual site. The site was build on Drupal 7.15 and i18n module. Couple of days ago I have updated core and all contrib modules. Everything works kind a nice but I have noticed when ...
1
vote
0answers
24 views

Drupal 7 menu translation using feature

What I am trying to achieve is I have a drupal site which is basically in English & German. I have installed & enabled all the necessary modules for Translation, and my content is also ...
1
vote
0answers
29 views

Check anonymous access for menu items via menu_tree_all_data

I am attempting to manually generate a menu which combines several menus with menu_tree_all_data. The problem I am having is that if the user is authenticated the first time the menu is built, the ...
1
vote
0answers
31 views

Drupal 7 menus collapse for Views links

When I reference a view name and/or view name with contextual filters in the menu Path for child menu items, they do not stay expanded on display of the view page. I had this solved on another site, ...