node_example_menu

Versions
4.6 – 4.7
node_example_menu($may_cache)

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.

Code

developer/examples/node_example.module, line 112

<?php
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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.