Project:Menu Trail By Path
Version:7.x-2.x-dev
Component:Miscellaneous
Category:task
Priority:normal
Assigned:Unassigned
Status:postponed

Issue Summary

I created a sandbox http://drupal.org/sandbox/derhasi/1357952 that provides a feature, that sets the active trail (instead of the menu trail) by using the path. Maybe this could be a nice additional feature for this module?

The module is usefull for structure's, where it is not determined via menu trees, but can be determined by the sole path (as nodetypes with child node types, views, ...).

Comments

#1

Do you mean the breadcrumb?

#2

In parts yes. I allready saw there is a "breadcrumb"-Feature in menutrails by path, but that only works for paths that are a menu link.

#3

The current breadcrumb handling is very basic - It just grab all the parents paths in url and add them to breadcrumb

<?php
foreach($parent_candidates as $link_path) {
  if (
$menu_item = menu_get_item($link_path)) {
   
$breadcrumbs[] = l($menu_item['title'],$link_path);
  }
}
drupal_set_breadcrumb($breadcrumbs);
?>

I think it does work with links that are not on a menu tho. menu_get_item() returns a router item (I know the name is misleading)

Do you have better ideas?

#4

Status:active» postponed

Were you planning to use menu_set_active_trail? Don't. It's getting chopped off.

See Remove misnamed and useless menu_set_active_trail() function

#5

That's a good point!