Hi, I'm trying to create a menu item that I am trying to link to the logged in users edit page, I have played around with the configurations in the menu item and can't seem to get this to work.
How would I achieve this?
Thanks
Aaron
Hi, I'm trying to create a menu item that I am trying to link to the logged in users edit page, I have played around with the configurations in the menu item and can't seem to get this to work.
How would I achieve this?
Thanks
Aaron
Comments
Comment #1
jweedman commentedI am currently using "[site:url]user/[user:uid]/edit" as the path - with "Use tokens in title and in path" checked and User Method for Users set to "User from context".
This seems to work when I am on the user's page - or in the user section for that matter (user/anything). But if I go outside the user section (node/add/content-type for example), this breaks down. Strange.
Is there a settings I am missing?
Comment #2
jweedman commentedUpdate to my previous post in #1: Figured it out. I'm an idiot...
Not sure why I was using [user:uid]. That tries to use the user in the context of the current page. That's why it only worked if you were in the user section. SO... use this path, with the same things checked that I mentioned above, and it should work. Working for me:
Path: "[site:url]user/[current-user:uid]/edit" (the [site:url] at the beginning is important)
Use tokens in title and in path: Checked
Not sure if you need "Method for Users", but I have it set to "User from context". That's probably not needed if you're pulling info from the currently logged in user with the [current-user] token.
Hope this helps!
Comment #3
forestmars commented[current-user:url]/editalso works for this, and will allow you to point to a nice user url than the uid.Comment #4
forestmars commentedComment #5
nbouhid commentedThe only way that worked for me is:
user/[current-user:uid]/edit
[current-user:url]/edit would render as user/admin/edit which is a wrong url.