Condition not triggering breadcrumbs for a View

notebene - March 11, 2009 - 01:28
Project:Node breadcrumb
Version:6.x-1.0-beta2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I love this product, solved a 'lot' of problems for me today. Menu breadcrumbs only took me so far, and Custom Breadcrumbs, well those were just confusing and I never got it to do what I wanted. This allowed me to easily and intuitively hook up some 'orphan' pages in the site with some parent menus as breadcrumbs. Perfect.

To the point, I have about 12 built thus far, a few have PHP conditions, most are based off of Taxonomy. The PHP ones are all of the flavor strpos($node->path, 'something') !== false, and those seem to work great.

Enter my newest one: I have a View (Views module) that has a URL of, say, you/are/here. You can get to it at www.thesite.com/you/are/here. A View doesn't have a $node->path, so I ventured down the path of using arg(). I tried the following in my template to see if it would work, and it returns 'true' when I get on the appropriate page(s):

in_array('are', arg())

That returns 'true' when I visit /you/are/here. However, when I try to use the same condition in a Node Breadcrumb, it doesn't produce a breadcrumb.

At first I thought maybe there was some issue with Views and breadcrumbs, however, I have many other views (which have a menu item associated with them) that get assigned breadcrumbs properly through Menu Breadcrumbs, so that can't be it.

Any ideas?

#1

edhel - March 11, 2009 - 06:42

view is not node, but this module fix only breadcrumb (+menu location) for nodes on full page view.

You can add specific view to menu by standard admin page /admin/build/menu and it will have correct breadcrumb (at least if node breadcrumb is enabled).

#2

notebene - March 11, 2009 - 15:58

Yeah, this particular view doesn't have a menu item, nor do I want one for it. I suppose what I could do is give the view a menu that is the submenu of where I want the breadcrumb to go, then disable that menu, so the breadcrumb (via Menu Breadcrumb) and menu expand out to the parent menu, which is basically what I want and what I was hoping Node Breadcrumb would do for me, but like you said, that's probably just for nodes.

Thanks for the help!

#3

edhel - August 13, 2009 - 17:03
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.