when editing templates for a content type in Contemplate,
the menu trail is set based on the node used by Contemplate for variable example.
i.e. if node #27 is used as the example of available variables in Contemplate,
the menu trail is set to the same as viewing page node/27.
the below code add a simple detection for Contemplate in hook_nodeapi to solve the issue:
function menutrails_nodeapi(&$node, $op, $a3 = NULL, $page = FALSE) {
if ($op == 'view' && $page == TRUE) {
$menu_item = menu_get_item();
if ($menu_item['page_callback'] == 'contemplate_edit_type') {
return;
}
$item = menutrails_node_location($node);
if ($item) {
menu_set_item(NULL, $item);
if (variable_get('menutrails_breadcrumbs', 1)) {
drupal_set_breadcrumb(menutrails_get_breadcrumbs());
}
}
}
}
Comments
Comment #1
sunwell, that's a problem of Contemplate then.