Same name and namespace in other branches
  1. 4.7.x developer/examples/node_example.module \node_example_menu()

Implementation of hook_menu().

In order for users to be able to add nodes of their own, we need to give them a link to the node composition form here.

File

developer/examples/node_example.module, line 112
This is an example outlining how a module can be used to define a new node type.

Code

function node_example_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'node/add/node_example',
      'title' => t('example node'),
      'access' => user_access('create example node'),
    );
  }
  return $items;
}