I used custom_breadcrumb for displaying breadcrumbs for views,Path,node etc which worked fine.
but I've a problem with following paths which have been created using menu_hook inside the modules
ie
faq=>faq.module
event=>events.module
newsletter/subscriptions=>newsletter.module

How can I set custom breadcrumb for above mentioned paths as It's not being done by custom_breadcrumb_path module.

Thanks

CommentFileSizeAuthor
#1 cb_paths_hook_init.diff1.95 KBMGN

Comments

MGN’s picture

Version: 6.x-1.4 » 6.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new1.95 KB

The only way that I know to get to those pages is through hook_init. The attached patch implements hook_init for custom_breadcrumbs_paths. I've done some limited testing and it seems to work.

The only thing I don't like is that on node pages with path-type breadcrumbs the breadcrumb will be set twice. Once through hook_init and again through hook_nodeapi. It would be better performance-wise to avoid this, but I am not sure how.

Note that some modules (like forum) set their breadcrumbs inside theme templates. This patch will not work for module pages like these.

Let me know if this approach works for you.

MGN’s picture

Status: Needs review » Postponed (maintainer needs more info)
drupalhooked’s picture

Status: Postponed (maintainer needs more info) » Needs review

Thanks MGN.
Let me download and test it

Thanks

MGN’s picture

Status: Needs review » Fixed

Thanks. I';ve tested this patch on a couple of sites over the last week and it seems to be working fine. I've committed this to 6.x-2.x-dev for further testing. If there are problems, please open a new issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.