So I wanted to link to these different profile editing pages from the menu:
user/%user/edit/Personal information
user/%user/edit/Contact details

That wasnt easy to do, so I created pages two pages that just have this code

<?php
global $user;
drupal_goto('user/' . $user->uid . '/edit/Personal information');
?>

(with contact details substituted for the second page)

When the user is not logged in, neither of these links should show as they head to access denied, however the weird thing is, is that the personal information link still shows, while the contact details link doesnt..

I've also tried adding the menus in through my custom module instead in hook_menu with this code:

  $items['user/%user/edit/Personal information'] = Array(
      'title' => 'Edit Personal Information',
      'menu_name' => 'primary-links',
      'type' => MENU_NORMAL_ITEM,
      'weight' => 40,
      'access callback' => array('rbms_access_user'),
      'access arguments' => array(1),
  );

but I cant get the menu items to show in primary links at all. am probably missing something simple with this one. I know that access callback function is working cos it works for a different menu item.

any ideas on either front? I'm supposed to be delivering this to my client on monday, and didnt expect problems with this.. arg.

Comments

SamuelFreeman’s picture

Yeah one easy way I do this is to use the "Me" module to replace UID with ME so you can alter the primary links. Give that a go: http://drupal.org/project/me

Hope this is what you're after!

fudge714’s picture

thanks for pointing this out..

SamuelFreeman’s picture

Not a problem mate