Closed (fixed)
Project:
Panels Breadcrumbs
Version:
7.x-1.1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2011 at 09:58 UTC
Updated:
1 Nov 2011 at 13:39 UTC
Jump to comment: Most recent file
Comments
Comment #1
bennetteson commentedComment #2
bennetteson commentedAdd real alter capacity.
Please review.
Comment #3
bennetteson commentedThe good one now.
Please review.
Comment #4
devuo commentedThanks for the contribution, I'll review it during the weekend and commit it if there's no problem with it.
Comment #5
nod_Why the new hook? can't it be done with the default menu_breadcrumb ?
Something like the following would work. There is a little bit of copy/paste from menu_get_active_breadcrumb(). On the plus side, it doesn't break themes who alter breadcrumb and you can add classes and everything you want in the alter hook.
And actually It really bugged me that whatever is in $breadcrumbs is HTML and not an array. No way to properly theme the thing.
replace around line 131 until the end of the function
And you don't need the config to configure the
<front>link anymore.Comment #6
bennetteson commentedWill test your code today.
Comment #6.0
bennetteson commentedBetter description.
Comment #7
bennetteson commentedI'm partialy agree with you. But your script do not permit to use <none> path to have a no-link item in breadcrumb.
So I upgrate your script :
Comment #8
bennetteson commentedno need isset($parent['href']).
Please review.
Comment #9
nod_Oh ok, sure it was quick and dirty for a proof of concept. I expected to be magically accepted by l().
I'm not sure why you'd want a breadcrumb element without a link but hey, i'm not everybody. for example Zen takes care of that at the theme level with a theme setting and a bit of preprocess magic.
I see that the custom_breadcrumbs dev version will handle panels too http://drupalcode.org/project/custom_breadcrumbs.git/tree/refs/heads/7.x...
Comment #10
nod_all good :)
Comment #11
bennetteson commentedGreat !!! :)
Comment #12
nod_Actually it should be the maintainer reviewing this.
Comment #13
bennetteson commentedWill be, see #4
Comment #14
devuo commentedApparently it's all good, so I'll be writing later today an panels_breadcrumbs.api.php to expose this hook to IDEs and for clear documentation. I'll probably release 7.x-1.2 with these changes today or tomorrow. Thanks for the valuable contribution :)
Comment #15
bennetteson commented@devuo.
You don't have to. Finally this patch do not declare a new hook, Only use hook_menu_breadcrumb_alter() witch is a build-in drupal hook.
See #5 and http://api.drupal.org/api/drupal/modules--system--system.api.php/functio...
Comment #16
devuo commentedAh- ! It's all good then, will commit it later today ;)
Comment #17
devuo commented7.x-1.2 has been released.
Comment #18
devuo commentedComment #18.0
devuo commentedNow use hook_menu_breadcrumb_alter().