Hi All,

I have to know the module name from the accessed url.

I want to explain a bit clear.

'about-us' is a link defined in the custommodule_menu function.

So,how can i know the module name by the url.

Means if user used the url like http://example.com/about-us i have to know the module name from the menu link about-us.

Please help me .This is very imp for my project.

Thanks in advance,

Chandra sekhar Y.

Comments

phdhiren’s picture

Just check out Drupal menu system.
http://drupal.org/node/300997 will also be useful

chandra sekhar’s picture

thanks for responding

I want to know is there any function in drupal which can do my requirement.

Please tell me the solutions.

phdhiren’s picture

You can refer to same menu system book page http://drupal.org/node/140311

Suppose your customized module name is custom_module then...

function custom_module_menu() {
  $items['example/case1'] = array(
    'title' => 'Example title - Case 1',
    'description' => 'Description of the Case 1 item, with no t()!',
    'access callback' => TRUE,
    'page callback' => 'custom_module_example_page_callback',
  );
  return $items;
}

function custom_module_example_page_callback() {
  $output = 'example page output';
  return $output;
}

For complete understanding you can consider visiting following:
http://api.drupal.org/api/function/page_example_menu/6
http://api.drupal.org/api/file/developer/examples/page_example.module/6/...

chandra sekhar’s picture

thanks for responding

I want to know is there any function in drupal which can do my requirement.

Please tell me the solutions.