Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cecilemuller
Created March 4, 2012 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cecilemuller/1973253 to your computer and use it in GitHub Desktop.
Save cecilemuller/1973253 to your computer and use it in GitHub Desktop.
Add a shortcut to "Create Node" at /admin in Drupal 6
<?php
/**
* Implementation of hook_menu().
*
* Add a shortcut to "create node" in the Admin page for users
* that have the permission to create at least one type, in Drupal 6.
*/
function MODULENAME_menu(){
return array(
'admin/content/create' => array(
'title' => 'Create',
'description' => 'Create Nodes',
'access callback' => 'menu_valid_path',
'access arguments' => array(
array('link_path' => 'node/add')
),
'page callback' => 'drupal_goto',
'page arguments' => array('node/add'),
)
);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment