Why is url not registered?(Drupal 6.x)
Posted
by Andrew
on Stack Overflow
See other posts from Stack Overflow
or by Andrew
Published on 2010-05-22T03:13:10Z
Indexed on
2010/05/22
3:20 UTC
Read the original article
Hit count: 232
I'm using hook_menu to register new url so that accessing this url would return some data to ajax function. As title suggested, this url is not registered. How do I know that? I've tried typing this in address bar but, drupal, return main template only rather than the tests string that I created. I'm positive that my module is working for php issues error if I intentionally write wrong syntax. And, yes, I clear cache whenever I make changes. Here's the code -
function test_menu() {
$my_form['test'] = array(
'title' => 'Test address',
'page callback' => 'test',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
return $my_form;
}
function test(){ $a= "testing";
return $a;
}
© Stack Overflow or respective owner