1

i have a site with menu items and i want to make the item link to any block i want for example :

i have "About me" item in the menu and i want this item to link to a block that user can find it at the bottom of the page if he click on it will directly takes him down to the block. any suggestion please to do that ?

i add an ID for the block by block_attributes module

1 Answer 1

3

You can use the Void Menu module to achieve this.

Void menu allows you to configure special values to tags for use in the Drupal 7 menu system. You can customize up to 10 different void tags with any value you wish and use them freely inside the Drupal menu system.

For example, to link to a block with an id of #about, go to the Void Menu configuration page (admin/config/user-interface/void_menu), and set one of the "tags" to your block id (including the #).

Set a tag to a block id

Then set your menu link path to the tag name.

Set the menu link path to the tag

For smooth scrolling you can use the Scroll to destination anchors module.

This module modifies the default behavior of destination anchor links...so that users will be smoothly scrolled to the destination instead of immediately being jumped.

You will need jQuery to use the Scroll to destination anchors module.

1
  • You're quite welcome!
    – Kristin
    Sep 4, 2016 at 13:34

Your Answer

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

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