I'm trying to create a menu item that changes dynamically according to the logged in user.
Here's the code in my module:
<?php
global $user;
$current_uid = $user->uid;
$current_name - $user->name;
function willmodule_menu(){
$techprofile = 'tech=profile/' . $current_uid . '/' . $current_name;
$items['$techprofile'] = array(
'menu_name' => 'menu-tech-account-menu',
'title'=>'View Your Tech Profile',
);
return $items;
}
?>
I have no idea what I'm doing wrong. My menu item isn't even showing up. On the plus side, it's not breaking my site, though.
Well there are few things either typos while posting or actual mistakes in code: