Need a link to user profile page.

Hi..
I have a problem. I want to create a link in navigation bar with the name "My Profile" that take the user to its profile page. But I am unable to create it.

The problem is that I want to show this link on every user's page. I want to add it in navigation under a parent menu.

is there any solution.

When any user login, this link will take the user to his profile page/myaccount.

Please help me.

One way is to use some php in

cog.rusty - February 24, 2009 - 13:30

One way is to use some php in a theme template file or in a block (if you have enabled the "php code" module in admin/build/modules):

<?php
global $user;

$userpath = 'user/' . $user->uid;
print
"Welcome " . l($user->name, $userpath);
?>

If you want to put it in a regular menu, which doesn't allow php, you can use a different method:

First, install the http://drupal.org/project/me module to get links like "user/me" instead or "user/15" for the current user, and then use user/me as a path in the menu entry.

Is not there any method that

umarbukhari - February 24, 2009 - 14:29

Is not there any method that I post a path on page path menu.

What do you mean "page path

cog.rusty - February 24, 2009 - 14:35

What do you mean "page path menu"? The path of a post which you are editing? No, you don't want the post which you are editing to take the place of the user's profile.

The second method will let you put "user/me" in your menu and users will see their own profile when they click on it.

yes this is the thing that i

umarbukhari - February 24, 2009 - 15:34

yes this is the thing that i want. But it is not working I typed ther "user/me" but it not going to submit.

Did you install the "me"

cog.rusty - February 24, 2009 - 16:02

Did you install the "me" module first?

Thanks for helping me. It has

umarbukhari - February 24, 2009 - 16:17

Thanks for helping me.

It has done.

 
 

Drupal is a registered trademark of Dries Buytaert.