Fix for Fix for Creating a simple menu entry

  1. /*
  2.  * I'm trying to create a menu item that links to 'author/<username>', where username is the name of the logged in user.
  3.  * The menu has no callback associated, it's just a simple menu item, pointing to a view page that takes the username as an argument.
  4.  * For some reason, the menu just doesn't show. I've cleared the cache but still no luck.
  5.  * Can someone tell me what is wrong with this code?
  6.  */
  7.  
  8. function wf_menu() {
  9.   global $user;
  10.   $items['author/'.$user->name] = array(
  11.     'title' => 'My Author page',
  12.   );
  13.   return $items;
  14. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.