Set the active menu item

/ Published in: PHP
Save to your folder(s)

If you want to set the active menu trail in a node, simply add this to your template.php in the 'template preprocess node' function.

Copy this code and paste it in your HTML
  1. $item = menu_get_item();
  2. $item['href'] = 'node/{insert id here}';
  3. menu_set_item(NULL, $item);

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.