Closed (fixed)
Project:
Custom Breadcrumbs
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Aug 2010 at 18:09 UTC
Updated:
10 Nov 2010 at 15:40 UTC
Not sure if this is "by design," but should custom_breadcrumbs_unique_breadcrumb_id() return a value even when breadcrumb visibility with PHP evaluates to false?
Comments
Comment #1
gg4 commentedSort of related.
Note that this code has access to the $node variable, and can check its type or any other property.
This code works in my node.tpl.php files, but doesn't seem to evaluate correctly when using Breadcrumb visibility with PHP. Should I be accessing the $node object in some other way?
$node->field_item_type[0]['value'] != '456' ? return TRUE : return FALSE ;Comment #2
MGN commentedIn the current code, this function sets the unique breadcrumb id when the breadcrumb is set (i.e. visibility is TRUE). This function also returns the id that was set last during the page request. So it should not return a value if a custom breadcrumb has not been set. But looking at the code now, I see that it would return a value - so this is a bug.
I think your code snippet is fine. Just to check, are you including the php tags in the breadcrumb visibility field? Php tags should not be included in this field (they are assumed).
Comment #3
MGN commentedI've committed a change to 6.x-2.x-dev. Hopefully that will resolve this issue. But if not, please provide details regarding the type of breadcrumb and the circumstance when the problem occurs.
Marking as fixed for now, but reopen if you are still seeing problems with this in the latest code. Thanks.