Last active
November 11, 2020 01:14
-
-
Save robdecker/9118730 to your computer and use it in GitHub Desktop.
[Create custom breadcrumbs for nodes] #d7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_node_view(). | |
*/ | |
function HOOK_node_view($node, $view_mode, $langcode) { | |
if ($node->type == 'TYPE') { | |
$breadcrumb = array(); | |
$breadcrumb[] = l(t('Home'), '<front>'); | |
$breadcrumb[] = l(drupal_get_title(), current_path()); | |
drupal_set_breadcrumb($breadcrumb); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment