Is it possibile to link menu links to the div or block on the certain subpage? If yes what is the method to do this?


One way of doing that using the #id of that block or div in the path of menu link pointing to the page like below:


basically you can link the menu to any div, block or anything having id attribute by appending the #ID at the last of the page path.

|improve this answer|||||

This is not completely straight forward. If you try to create and save a menu link like book/page#anchor-id, Drupal will give this error

The path 'book/page' is either invalid or you do not have access to it.

You will need the node ID. Drupal wants the link to look like this: node/55#block-you-want.

The easiest way to do this is

  1. Save the menu link without the anchor id. ex: /book/page
  2. Drupal will create the menu link like this: node/55
  3. Edit your menu link to: node/55#anchor-id. Save again.
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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