I have the following in my theme:
$items['user/%user/sms-services'] = array(
'title' => t('SMS Services'),
'page callback' => 'sms_user_page',
'page arguments' => array(1),
'access callback' => 'user_is_logged_in',
'type' => MENU_LOCAL_TASK,
);
It works great in that it:
- Creates a url /user/USER_ID/sms-services
- Creates a tab on the /user page
However, I want to get rid of the USER ID part. I.e. The link must work as:
/user/sms-services
And /user/USER_ID/sms-services must redirect to /user/sms-services
And /user/USER_ID must redirect to /user
Is there an easy way to do this?
UPDATE
I used the "me aliases" module to accomplish much of this, but it's still not a very elegant solution, because now i'm stuck with TWO urls working:
/user/me/some-action
AND
/users/393/some-action
When all I really wanted was:
/user/some-action
Anyone got any ideas?