3

Is hook_menu the only way to define a new path?

http://drupal.org

I'm adding a new page at http://mydrupalsite.com/example. It's all static content and has a different theme so I'm defining the content in page-example.tpl.php.

But I still need to define a path for drupal to know about this page. The normal way of adding a new path is with hook_menu, but is there any other way? My problem with hook_menu is that the new path doesn't get activated unless I specify a "page callback" but I'm not sure what to put in this case since all I want is just to define a new path. Has anyone dealt with this before? I'm hoping there's a better way than hook_menu for this.

  $items['example'] = array( 
    'page callback' =>                        // don't know what to put here
    'type' => MENU_CALLBACK,
    'access callback' => TRUE,
  );

Read »
Created by Dplanet 1 year 37 weeks ago
Category: Modules   Tags:
  • Dplanet
  • fourkitchens
  • david_normaan

PSD to Drupal Theme

Drupal Development

Module Development

Get an Estimate

Tags for Is hook_menu the only way to define a new path?

Recent comments