19 Oct
2006
19 Oct
'06
12:57 a.m.
_craig wrote:
I want the opportunity to affect the breadcrumb trail already set by modules that used drupal_set_breadcrumb in their menu callbacks. I want to have a final say on what the breadcrumb will really be. You could always do it in template.php. Here's a snippet of mine: It's not the best solution I suppose, but it works!
function _phptemplate_variables($hook, $vars) { switch ($hook) { case 'page': if (arg(0) == 'forward' && is_numeric(arg(1))) { $node = node_load(arg(1)); _mymodule_project_set_breadcrumb($node, TRUE, array(l(t('Spread the word'), 'promote/'. $node->nid))); $vars['breadcrumb'] = theme('breadcrumb', drupal_get_breadcrumb()); } ....