0

Task: I want to add an edit option in the admin menu that would only appear while viewing a node while logged in as admin. The link of the edit item can be like node\%\edit so that clicking on the link would take the user to its edit page.

1 Answer 1

1

You could use the Menu Token module to achieve the same:

  1. Install the module and its dependency, i.e. the Token module.
  2. Create a new menu item with path node/[node:nid]/edit.
  3. Place the menu block which contains the menu item in any region of your choice.
  4. Drupal menu system takes care of showing the menus as per the access; which means that only users which have permission to edit the node should see it.

The image below is an example shown on the project page. You could use it as a guide.

Menu token PDF

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.