Recently, a reader of clubosc, “Snowbird” brought up an interesting diversion based on one of my previous posts about changing the breadcrumb in osCommerce.
I did not know that Google sometimes shows breadcrumbs as part of the Search Engine Results Page (SERP), like so;
The breadcrumb part is the bottom line (in green). Note that the example is a result from Türkiye Google (Turkish Google), but can also be seen on the main google site as well as UK and many other Googles.
How to recreate this in osCommerce?
After some fiddling with code, I found that the simplest way is to use Googles examples as detailed here, the RDFa format is the easiest and involves changes to only 1 file!
Open up /includes/classes/breadcrumb.php and change the trail function as shown below;
Easy as that. I’ve also pasted the function here and if you want you can download the whole new breadcrumb class file here.
The changes really don’t do anything to your design, they only give Google the code it needs to determine that these links are to be used to produce a breadcrumb within your search listings.
Easy as 123. Of course, I give no guarantee that this change will do any good to your search results, please let me know if any of you change your breadcrumb and if Google then picks it up and displays as a breaded list of links in your SERP. Thanks.
I wonder if one could set that SPAN to display: none if their design isn’t visually appealing with breadcrumbs.
Above Gary’s one uses RDFa method. However DIV inline property needed for DIVs and SPANs to have them inline on a same row
Alternatively Microdata method can be used (DIV)
http://pastebin.com/5u6iDGKS
Dont forget to add below CSS in your stylesheet.css
#breadcrumbdiv { display:inline; }
Finally I see it in Google search results
http://www.google.com.tr/search?q=Acura+AC-2060+hepsiparis
SN – nice work. Did you use your microdata or rdfa ?
For everyopne else, we are talking about the breadcrumbs seen in Google Search Result;
Whcih match those seen in the site;
RDF method is much easier to implement I guess and I used that one.
So…
I have a 4 month wait to see results…
but is it just a gimmick or can it be of use?
It can only help, would be my opinion. Else why would Google have it there in the first place (because we all know that Google owns the internet ;))
Gary, can one make breadcrumbs available for Google whilst hiding them on the site? ie: they are not visible on your pages but Google can still see them and list them?….hope I make sense lol
Isa – have a read of http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=66353
In short, hidden stuff is frowned on by Google. Though, I suspect that if your intent is to HELP your customers by having hidden stuff, it should not be a problem. Might be worth emailing Google…
Thanks for the link Gary.
….after reading that article it seems fair to think that it would be unwise to try and hide my breadcrumbs, even if I don’t see how that could be perceived as “deceptive in intent”. Can’t Google understand the need of hiding breadcrumbs solely for design purposes?
It looks like the included breadcrumb.php file is missing:
} else {
$trail_string .= $this->_trail[$i][‘title’];
so if there is a breadcrumb with no link nothing is shown. For example, after you place an order the breadcrumbs aren’t there – just the separator since the breadcrumbs are no longer active links.
This works PERFECT!!! Thx!
Hi Rene, thanks for letting us know it worked for you.