Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
My choices on the user menu are "My account" and "Log out".
When the user clicks on My account he goes to his main account page which does NOT show the fields added via the Profile 2 module. He must click on "Edit" and then on "Main profile" to get to those fields.
I thought It would be preferable to put a tab on the main menu with 3 choices: "Main profile", "Change password", and "Log out". Then I'd get rid of the User menu entirely which I think would make the entire page more intuitive and neater.
To do that I'd need menu links like example.com/drupal/user/[user:id]/edit, etc. Where [user:id] would obviously resolve to the user's ID.
This is over a year old now, but in case anyone else comes across this thread:
Once you've enabled the Profile2 Pages module, you also have to enable the "Provide a separate page for editing profiles" checkbox on the Member Profile content type. Once that is enabled, the "My member profile" (or whatever you named the profile type) will appear in the user menu. Direct links (/profile-machine_name) will also work.
I Created a new View blocked using Profile entity and named is Profile link.
Under advance relationships, add the relationship User (owner of this profile) and select use this as a relationship.
In the fields entity:- added user name. ( Since the profile path of any user would be /user/username).
Still on the field user name - do the following (1) Select link this field to this user ( I didnt want to create a label, since I only wanted a link instead)
(2) In the rewrite results area - I enabled the following: Rewrite the output of this field: My profile page , and also Output this field as a link ( using the patterns) I typed the following: members/[name]
Most importantly, in the views filter add user current ( Set to logged in): This will work for any profile user that logs in.
On the views page, also ensure that access is set to (role) that is associated to the profile type.
Once this is done on the views, you can go to structure>blocks> and enable the view block you have just created. Also you can choose to display the block where you want.
Hope this helps
(The problem I had was usually the first applicant gets a members/username-0, so I always create a dummy account first before going live.)
*)
Comments
Comment #1
ptmkenny commentedTo make a link to a specific user profile if you are using the Profile Pages module, you can use this format:
profile-machinename/userid
* machinename is the machine name of the profile.
* userid is the Drupal account user id.
It would be great to have a block that could be enabled to link to each profile on the user profile page, but that's beyond my coding ability.
Comment #2
CharlieCastle commentedThanks ptmkenny,
I'm going to look into the Profile Pages module. I wasn't aware of it.
Update: I see that Profile Pages is now depreciated.
I'm using the Profile 2 module. Any help there?
Thanks, CC
Comment #3
fagoactivate the profile2 pages module that comes with the module.
Comment #4
CharlieCastle commentedHi,
The profile2 pages module is enabled. But I don't see how that answers my question.
What I want is a menu item "My profile" that the user can click on to see his profile.
As it is now he has to go to "My account" and then, through a rather arcane series of clicks, get to his profile page.
Thanks, CC
Comment #5
ptmkenny commentedWhen I enabled the pages module, links automatically appeared for each profile in the user menu. Perhaps you should double check the user menu?
Comment #6
CharlieCastle commentedMy choices on the user menu are "My account" and "Log out".
When the user clicks on My account he goes to his main account page which does NOT show the fields added via the Profile 2 module. He must click on "Edit" and then on "Main profile" to get to those fields.
I thought It would be preferable to put a tab on the main menu with 3 choices: "Main profile", "Change password", and "Log out". Then I'd get rid of the User menu entirely which I think would make the entire page more intuitive and neater.
To do that I'd need menu links like example.com/drupal/user/[user:id]/edit, etc. Where [user:id] would obviously resolve to the user's ID.
I don't see any way to do this.
Any ideas?
Thanks, CC
Comment #8
itserich commentedThe user id is not necessary in the menu path.
profile-machinename should work.
profile contact_info is linked at profile-contact_info
Figured this out by enabling the block and viewing where it links.
Comment #9
erilot commentedThis is over a year old now, but in case anyone else comes across this thread:
Once you've enabled the Profile2 Pages module, you also have to enable the "Provide a separate page for editing profiles" checkbox on the Member Profile content type. Once that is enabled, the "My member profile" (or whatever you named the profile type) will appear in the user menu. Direct links (/profile-machine_name) will also work.
Eric
Comment #10
msavike commentedI Created a new View blocked using Profile entity and named is Profile link.
Under advance relationships, add the relationship User (owner of this profile) and select use this as a relationship.
In the fields entity:- added user name. ( Since the profile path of any user would be /user/username).
Still on the field user name - do the following (1) Select link this field to this user ( I didnt want to create a label, since I only wanted a link instead)
(2) In the rewrite results area - I enabled the following: Rewrite the output of this field: My profile page , and also Output this field as a link ( using the patterns) I typed the following: members/[name]
Most importantly, in the views filter add user current ( Set to logged in): This will work for any profile user that logs in.
On the views page, also ensure that access is set to (role) that is associated to the profile type.
Once this is done on the views, you can go to structure>blocks> and enable the view block you have just created. Also you can choose to display the block where you want.
Hope this helps
(The problem I had was usually the first applicant gets a members/username-0, so I always create a dummy account first before going live.)
*)
Comment #11
janis_lv commented#9 , thank you