Tuesday, 20 January 2015

Drupal 7 adding User to Menu Link.

Adding %user to Menu Link  - use tokens -  try the ‘Menu Token ‘  module. 

Here's how I solved this one. 

Installed the Module Menu Token  .  I had to use the Development Release here as the Recommended release did not work for me.  It also needs the Universal Unique Id module .

1. Add the module 'Menu Token'
2. Go to the Modules 'configuration'
3. Add the entities that you'll be needing the tokens from ..
4. Add your path link following the modules instruction - ie user/[current-user:uid]/profile
5. tick 'use tokens'
6. Select how you want this relationship to work from the dropdowns. ie 'Method for Users' = 'User from context'

For menus go to add links and then follow the instructions from stage 4. 

No comments: