I have created menu with sub-menus. The menu block is placed on the specific page.

Drupal menu path allows only allows normal path to be given to menus(like node/nid and pagepath). I want to give path like node/256#myblock.

I do not want to go with contributed modules(void menu or any other) as this is for the single link in my site.

1 Answer 1


Modules are how you extend Drupal's functionality; there's very little point saying you want to achieve something without a module, as if one exists, you're just going to end up copy/pasting its code into your own module/theme anyway to get the same effect.

Drupal core has no functionality to link to an anchor, so you need to install a module which does, or copy the code from one to your own.

Whichever of those methods you decide to use, Special Menu Items has the functionality you require (you can either install and use it as normal, or pick the relevant bits of code out into your own module/theme).

  • Thanks for your answer. I used this module and it works for my problem. Aug 31, 2015 at 12:42

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.