Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Can I disable the breadcrumb from displaying product names? 
 
mr_dimsum
Member
 
Avatar
Total Posts:  35
Joined:  2008-01-28
 

I’m modifying the Modern Theme provided through Magento Connect right now, but have come to an issue I am getting worried about. I have a lot of sub-categories, and with product names being displayed on the breadcrumb, I’m worried it will spread it over two lines. While this isn’t a huge issue, I just overall, feel it breaks the minimalistic and open/clutter-free look of the theme.

Does anybody know how to disable the titles from being displayed? I have provided some images of my breadcrumb to highlight how easily this can occur, as a product in a sub-category gets “close” to hitting the maximum one-line capacity. The first image shows how it looks normally, while the second one highlights the imposing problem that may occur from future additions of long-name products and more sub-categories if applicable.

Danny

Image Attachments
breadcrumb1.jpgbreadcrumb2.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
alkarim
Guru
 
Total Posts:  368
Joined:  2008-04-10
 

I don’t if we can disable the breadcrumb on administrator ?
but If you are going to disable the breadcrumb to whole pages , you can try this…

go to app/design/frontend/default/default/template/page/html/breadcrumbs.phtml

change this :
<?php if($crumbs && is_array($crumbs)): ?>

into this ;
<?php if( false && $crumbs && is_array($crumbs)): ?>

hope this can help you

 
Magento Community Magento Community
Magento Community
Magento Community
 
mr_dimsum
Member
 
Avatar
Total Posts:  35
Joined:  2008-01-28
 

Thanks for the quick reply. I’ll give the code a shot when I get back!

Not sure what you meant by whole pages, but I basically just want the breadcrumb, when on product pages, to just not display the product name in the trail.

So when I have a product in the sub-category named “T-Shirts”.. I don’t want the name of the shirt “The Woman and Guns Tee” on the breadcrumb, as the name is already displayed on the product page.

As it stands now, when I’m on a product page, the breadcrumb would display:
Men’s > Clothing > T-Shirts > Woman and Guns Tee

I’d ideally be looking at it to not display the product name, so ti would look like:
Men’s > Clothing > T-Shirts

 
Magento Community Magento Community
Magento Community
Magento Community
 
alkarim
Guru
 
Total Posts:  368
Joined:  2008-04-10
 

wow, ok .. now I got what you mean…

geez, mr_dimsum… but I just can’t figure it out, sorry

but if you know the way how to make it, please tell me.... thanx

 
Magento Community Magento Community
Magento Community
Magento Community
 
vsimon
Jr. Member
 
Total Posts:  14
Joined:  2009-07-06
 

Possibly too late to help the above enquirer, but maybe this will assist others looking for the same solution.
To remove product name from the breadcrumbs trail (usually because prod name is long/redundant)

Go to:
/public_html/app/design/frontend/default/default/template/page/html/breadcrumbs.phtml

Line 34
Replace:

<?php elseif($_crumbInfo['last']): ?>
<strong><?php echo $this->htmlEscape($_crumbInfo['label']) ?></strong>
<?php else: ?>

With:
<?php elseif($_crumbInfo['last']): ?>
 
<?php else: ?>

I am not a PHP programmer but this is a crude fix…

 
Magento Community Magento Community
Magento Community
Magento Community
 
jmorrow1983
Jr. Member
 
Total Posts:  1
Joined:  2009-01-17
 

I am having a similar issue.

I cannot figure out how to simply remove one category from the bread crumbs…

For example, I currently see Home /Catalog /Adult Apparel /Sweatshirts (catalog being a root category for many sub categories).
I would like to see Home/Adult Apparel/Sweatshirts…

Can anyone point me in the right direction?

Thanks in advance.

UPDATE : Since the magento core appends the category-id into the class of the breadcrumbs list, I simply targeted it in the CSS using li.category7947 {display:none;}.

 
Magento Community Magento Community
Magento Community
Magento Community
 
neoanderson2006
Jr. Member
 
Total Posts:  9
Joined:  2008-08-10
Kochin
 

You can disable the product name from bread crumb using the following css
.breadcrumbs ul li.product {
display: none;
}

Hope that helps

 
Magento Community Magento Community
Magento Community
Magento Community
 
kylesong
Jr. Member
 
Total Posts:  1
Joined:  2010-01-08
 

please add follwing line
<?php $crumbs = array_slice($crumbs,0,count($crumbs)-1)?>
after
<?php if($crumbs && is_array($crumbs)): ?>

current category or product will be removed

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top