Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Dec 2009 at 15:31 UTC
Updated:
18 Jan 2010 at 20:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
jhodgdonGood point! The example for hook_view() in both D6 and D7 uses the menu_set_location() function, which does not exist.
http://api.drupal.org/api/function/hook_view/7
Should be fixed in D7, then ported back to D6.
Comment #2
jhodgdonLooking at the doc for the old menu_set_location() function in Drupal 5, as well as the current example for hook_view() (which is also left over from Drupal 5, sheesh!), it looks like the main purpose is to set the breadcrumb trail. So in D6/D7, I think it should be using drupal_set_breadcrumb().
Which means the array is a bit different as input to drupal_set_breadcrumb() as opposed to menu_set_location(). Also, http://api.drupal.org/api/function/drupal_set_breadcrumb/7 wants the array to start with Home and not to include the current page.
So I've rewritten the sample function body... needs a review, then can be ported to Drupal 6.
Comment #3
jhodgdonActually, try this one (small capitalization change).
Comment #4
dries commentedWe can remove the space before ')'. Otherwise the patch looks good to me.
Comment #5
jhodgdonSorry about that. Habits left over from previous coding standards in different project...
Comment #6
dries commentedCommitted to CVS HEAD. Thanks! Rock on, jhodgdon.