Hi,
i'm trying to add breadcrumbs in the products templates with the help of this tutorial:
https://www.cmscanbesimple.org/blog/bre ... cts-module
I got one bug: when i start from root hierarchy, go down in sub hierarchy, go to a product detail and then want to go on previous level, i got no more hierarchy summaries showing (but coming from detail to root =level-2 is ok !).
The url link in breadcrumb to come to H-1 (previous hierarchy) is like this : "https://www.mysite.com/products/hierarc ... yname.html"
If i change the url and add by in "/byhierachy/" it works !!
So how can i change the url for this H-1 link only? (by adding "by" before hierarchy).
Thanks for any help!
I use Products 2.26.9 and cms 2.1.6.
Breadcrumbs with Products issue
Re: Breadcrumbs with Products issue
I haven't updated that article for a while, so the method can be changed somehow because of module updates... Back then I made the article just because I wanted to know if and how it worked, but I don't have a website that uses it so can't tell if it still works for 100%.
Maybe I will dive into it some day during the holidays...
Note that this method can also be usefull here:
https://www.cmscanbesimple.org/blog/bre ... ews-module
Maybe I will dive into it some day during the holidays...
Note that this method can also be usefull here:
https://www.cmscanbesimple.org/blog/bre ... ews-module
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: Breadcrumbs with Products issue
Thanks Rolf for the reply and your good blog, i'm gonna pay you a coffee today ! 
For the moment i use this tip to correct the url with jQuery in Page Template (not the best solution but works) :
if ( $('.breadcrumbs').length ) {
if ( $(".breadcrumbs > a").length > 1) {
var myurl = $('.breadcrumbs a:nth-last-child(1)').attr('href');
myurl = myurl.replace('hierarchy', 'byhierarchy' );
$('.breadcrumbs a:nth-last-child(1)').attr('href', myurl);
}
}
For the moment i use this tip to correct the url with jQuery in Page Template (not the best solution but works) :
if ( $('.breadcrumbs').length ) {
if ( $(".breadcrumbs > a").length > 1) {
var myurl = $('.breadcrumbs a:nth-last-child(1)').attr('href');
myurl = myurl.replace('hierarchy', 'byhierarchy' );
$('.breadcrumbs a:nth-last-child(1)').attr('href', myurl);
}
}
Re: Breadcrumbs with Products issue
Wow, thanks! Much appreciated!Mich-adg wrote:Thanks Rolf for the reply and your good blog, i'm gonna pay you a coffee today !
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -


