Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

drupal module_hook problem

// does not work

function testmodule_menu($may_cache) {
  if ($may_cache) {
    $items = array();
    $items[] = array(
      'path' => 'node/12',
      'title' => t('Testing 123'),
      'callback' => 'do_it',
      'access' => TRUE,
      'type' => MENU_CALLBACK);
    return $items;
  }
}



// works

function testmodule_menu($may_cache) {
  if ($may_cache) {
    $items = array();
    $items[] = array(
      'path' => 'nodenode/12',
      'title' => t('Testing 123'),
      'callback' => 'do_it',
      'access' => TRUE,
      'type' => MENU_CALLBACK);
    return $items;
  }
}
« Newer Snippets
Older Snippets »
1 total  XML / RSS feed