this is my hook_menu as so far, i'm trying to get my module to display in primary links, but this doesnt even display a menu anywhere, even when i hard code the 'access' key to 'TRUE' it still doesnt show, what am i missing?

function options_menu($may_cache) {
   $items=array();
if (!$may_cache) {
    $items[] = array(
      'path' => 'node/6542',
      'title' => 'Salesman Panel',
      'access' => user_access('admin options_info'),
      'type' => MENU_NORMAL_ITEM
);
}     
//var_dump($items);
return $items;
}

Comments

pbarnett’s picture

If you get the menu id of the primary links using

<?php
    $mid = db_fetch_array(db_query('SELECT mid FROM {menu} WHERE title = "%s"', 'Primary links'));
    $pid = $mid['mid'];
?>

(Or just look up the mid from the database table using phpmyadmin or whatever),
then add a line to your item definition like

<?php
'pid' => $pid,
?>

you can control which menu the items are inserted into. (You may need to clear the menu cache)

Pete.

hoppurr’s picture

thx ;) it worked beautifully