how do i make some menu items dynamic?

leemarrett - January 24, 2008 - 05:20

Hi there,

I have a navigation menu built using the menu block in the drupal admin.

One of my menu items is "Update my details" which is currently pointing to a static node.

I would like this to link instead to the user/edit page so people can update their username, email and other profile bits.

The problem is, the url is /user/uid/edit, where uid is the, well, user id (so my edit page is /user/1/edit/)

How do i use the admin page and the text field for path to dynamically link to the edit page for the person currently logged in?

Thanks

Lee

why don't u try "theme_menu_item"

junedkazi - January 24, 2008 - 05:34

JUNED KAZI
junedkazi@gmail.com

Hi,
I am a newbie.But I think u can solve this issue using theme_menu_item
http://api.drupal.org/api/function/theme_menu_item/5
just try it out and post a feedback.

Cheers

want to do this at an admin level

leemarrett - January 24, 2008 - 23:04

thanks juned -- i will keep this in mind but at this stage i'm trying to do what i need from the admin and without dipping into the code, as the bulk of the menu items are standard nodes and all configured through the admin.

Token module

rastarr - January 24, 2008 - 14:15

Couldn't you enable the Token module and use /user/[uid]/edit though ?

token

leemarrett - January 24, 2008 - 23:05

have tried enabling the token module -- the menu module doesn't seem to be supported as when i try and put /user/[uid]/edit into the "path" field for the menu item, drupal hides the menu item altogether :)

i'm looking into using the pathauto module however and hopefully this will help me do what i want...

My apologies - I shouldn't

rastarr - January 25, 2008 - 14:12

My apologies - I shouldn't have opened my gob without testing it first. Just presumed it should - no idea why it doesn't though.
Weird.
Again, sorry for that

I did exactly this using the

WorldFallz - January 25, 2008 - 16:12

I did exactly this using the very small and simple 'me' alias module.

brilliant!

leemarrett - January 28, 2008 - 23:08

this did exactly what i needed as well :)

anyone looking to do this very thing should definitely check out the "me" module. works a treat, thanks worldfallz!

glad I could help!

WorldFallz - January 30, 2008 - 16:50

glad I could help! now where's my round trip ticket to NZ.... lol...

haha

leemarrett - January 31, 2008 - 03:39

haha it's in the post...

 
 

Drupal is a registered trademark of Dries Buytaert.