1. Home
  2. Prices
  3. Guided Tour
  4. New Shop
  5. Shop Review
  6. Ecommerce Marketing
  7. Ecommerce TV
  8. Magento Developers
  9. Portfolio
  10. Blog
  11. Contact
Home > Magento > Improved Magento Breadcrumbs

Improved Magento Breadcrumbs

Posted on: 28th Jan 2010 By: Adam Moss Leave a comment 1 Comment

A simple little SEO tip for Magento developers to take on board is the editing of one of the fundamental parts of any e-commerce website – the breadcrumb trail. By default the breadcrumb trail places the divider (a forward slash) into the list tags, meaning between each worthwhile list element is an unhelpful list element. This simple hack removes the wasted list tags and places the divider into the tags that contain the breadcrumb link.

Read below to see how to do it:

This is the appearance of the important part of the breadcrumb code before:

<?php endif; ?>
</li>
<?php if(!$_crumbInfo['last']): ?>
<li> / </li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<?php endif; ?>

You simply need to change the code towards the bottom of the file, at the end of the first endif statement:

<?php endif; ?>
<?php if(!$_crumbInfo['last']): ?>
/
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>

Your links will now change from this:

<ul>
<li><a href="/">Link 1</a></li>
<li> / </li>
<li><a href="/">Link 2</a></li>
<li> / </li>
<li><strong>Page 1</strong></li>
</ul>

To this:

<ul>
<li><a href="/">Link 1</a> / </li>
<li><a href="/">Link 2</a> / </li>
<li><strong>Page 1</strong></li>
</ul>
  • Twitter
  • AIM
  • WordPress
  • LinkedIn
  • Facebook
  • StumbleUpon
  • Technorati Favorites
  • Delicious
  • Ping
  • Digg
  • Bebo
  • Reddit
  • MySpace
  • NewsVine
  • Google Bookmarks
  • Sphinn
  • Propeller
Categories: Magento Tags: ,

One Response to “Improved Magento Breadcrumbs”

  1. Imischa

    Very handy, thank you! One question, for which version of magento is this for or doesn’t mater?!

Post A Comment