Routing is an important part of writing a module. In order to expose content or functionality on specific URIs on a Drupal site, routes or path are mapped to function callback. Drupal 8's routing system is heavily based on Symfony's, whereas prior versions relied on the routing parts of hook_menu().
Questions tagged [drupal-routes]
20 questions
0
votes
4 answers
The menu defined from my module returns a 404 error
I am new to Drupal. I have created a contace1 module with the following code:
contace1.info
; $Id$
name = Contact1
description = Show how to build contact form
package = Pro Drupal Development
core = 6.x
contact1.module
// $Id$
/**
* @file
*…
0
votes
1 answer
Multiple arguments on menu callback
I know how to pass one argument to a menu callback
$items['someaddress/%'] = array(
'title' => 'title',
'page callback' => 'some_function',
'page arguments' => 1,
'type' => MENU_CALLBACK
);
I don't understand why the argument…

Mark
- 32,293
- 33
- 107
- 137
0
votes
2 answers
Registering Drupal Menu Paths?
If I am making a module, and want to have two custom paths:
path/path/path/index.htm (calls drupal_get_form)
and post to
path/path/path/result.htm
How do you do that? I get a 404 on the second path. I get the form and what I want with the first path…

Kevin
- 13,153
- 11
- 60
- 87
0
votes
1 answer
hook_menu on drupal 7 unable to use url_encoded string as argument
Drupal 7
function custom_menu() {
$items['node_update/%nid/%pic/%name'] = array (
'title' => 'Redirecting to your profile page',
'page callback' => custom_node_update,
'page arguments' => array(3,4,5),
'access…

axscode
- 123
- 8
0
votes
2 answers
passing integers as parameter in drupal menu
I'm using drupal 6
Suppose I have
$items['path/yo'] = array(
'page callback' => 'callback_function',
'page arguments' => array(1),
'type' => MENU_CALLBACK,
);
It will instead pass in the part of the path that is in the 1-th…

pillarOfLight
- 8,592
- 15
- 60
- 90