Skip to content

Instantly share code, notes, and snippets.

@ezheidtmann
ezheidtmann / template.php
Last active August 29, 2015 13:55
Properly render menu trees in a menu_block when using drupal-bootstrap subtheme (Drupal 7, bootstrap 7.x-3.x, menu_block)
<?php
/**
* Implements theme_menu_link() for the main menu when displayed in menu_block
* block.
*
* Stock bootstrap theme doesn't render menus deeper than 2 levels because the
* navbar feature doesn't support a third level. But when rendering the menu in
* the sidebar, we can do unlimited nesting because we're not using the dynamic
* navbar.
*