Hi,
I'm having trouble trying to figure out how to set up the menu for my custom module. What I'm doing is basically a contact directory with the info coming from our department ldap server. What I want it to do, menu wise, is have two distinct types of pages. First is a listing page, for the paths:
/people - lists a welcome page
/people/all - lists everyone
/people/faculty - lists only faculty
/people/staff - lists staff
/people/ta - lists grads/ta
No problems here, this all works fine, the above are all local tasks to appear as tabs. The problem is that I also want to do the following paths:
/people/uid/view - views information for the user with given uid
/people/uid/edit - edit information for the user with given uid
I want these to be tabs as well. The problem I'm running into here is that when I do this, the view & edit tabs show up on the other list pages, and it seems the actions for view/edit don't actually get called because the menu system doesn't seem to match the action anyway.
Here is my trial menu code...
<?php
$items[] = array(
'path' => 'people',
'callback' => 'contact_list',
'title' => 'People',
'access' => user_access('view people'),
);
$items[] = array(
'path' => 'people/' . arg(1) . '/view',
'callback' => 'person_display',
'access' => user_access('view people'),