I use navigation block generated by block module. Tha block is displayes on all pages that belongs to book. I would like to add custom class to all links inside navigation block. I found that the block is generated by code here>


But I am unable to figure out how to alter links. Any help appreciated. Thank you.

1 Answer 1


Give a try to Block class module: Block Class allows users to add classes to any block through the block's configuration interface. By adding a very short snippet of PHP to a theme's block.tpl.php file, classes can be added to the parent <div class="block ..."> element of a block.

enter image description here

  • Hi, I need to add classes to links in menu, not to a block.
    – loparr
    Commented Sep 26, 2014 at 20:31
  • Try menu attributes module: drupal.org/project/menu_attributes for adding class to menu links. Commented Sep 26, 2014 at 20:50
  • I came across this, but one can not edit book menu.
    – loparr
    Commented Sep 26, 2014 at 21:15

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.