Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By razorback on
I have a jeans product setup in one vocab under two areas as follows:
boy>>Bottoms>>Pants
boy>>Denim
The breadcrumbs show up as
Home → Catalog → Boy → Bottoms → Pants → Denim
Is this a bug or config issue?
I need the bread crumb to represent how the user got to the product.... they would either have clicked through boy>>Bottoms>>Pants Or boy>>Denim
Thoughts?
Comments
if anyone has any thoughts I sure could use some help here.
no else has seen this before?
help please!?!
This is driving me nuts!
_
Maybe try the http://drupal.org/project/node_breadcrumb or http://drupal.org/project/custom_breadcrumbs modules.
i'll give them a shot
thanks
Terms with Multiple Parents
I'm dealing with the same issue. For a description see Scenerio at http://drupal.org/node/806784
It doesn't seem like it's Breadcrumb module is at fault because if I edit a product and select a Catalog term that resides under a single parent and submit it still selects the term for each parent, it won't allow me to select only one, which I suppose is because the one term shared by all parents. So I feel it's how they record the hierarchial relationships that make the difference.
Is this proper behavior? Can a term for a product be selected under only one of the term's parents?
Please tell me who has solved
Please tell me who has solved this problem, how did you do it? I have same problem
Use the following in your
Use the following in your template.php
For more info click here
function phptemplate_breadcrumb($breadcrumb) {
$uri_request_id = $_SERVER['REQUEST_URI'];
$urlexplode = explode("?", $uri_request_id);
$url = explode("/",$urlexplode[0]);
$args = count($url);
$output = " home";
$path = '';
$replace = array('_','-','+','%20');
// If there is more than one directory or page after home print it
if(isset($url[1]) && $args > 1){
for($x = 1; $x < $args; $x++) {
$text = htmlspecialchars(str_replace($replace,' ',$url[$x]));
if($x < ($args-1)) {
$path .= '/' . urlencode($url[$x]);
$output .= " > " . $text . "";
} else {
$output .= " > " . $text;
}
}
}
return '
';
}
Regards,
Sumaiya Javed
Web Developer
www.sumaiyajaved.com
www.phpjavascript.com
That won't work
Exploding $_SERVER['REQUEST_URI'] isn't going to work mate.
Imagine if the path is node/232, and the user got there via taxonomy/term/22
Your breadcrumb will look like home >> node >> 232
Here's one way of doing it
I must say I'm a little surprised that this is still an issue in Drupal, one would have well and truly thought that by now breadcrumbs would follow the users navigation and not just default to a single path to a product that exists in multiple categories, anyway here's a fix, it's no work of art however it does seem to work.
Just put this at the top of your theme_breadcrumb
It works!
I can confirm that the above works just fine. Here's the full function:
--------------------------------------------
Konordo Ltd
http://www.konordo.com