I am trying to remove the breadcrumb link home.
Also all categories just so it isnt to much writing as a lot of our categories names are rather long.
For example
So instead of it saying
HOME->ALL CATEGORIES->TOPS->POLO-TOPS
I want it to say
TOP->POLO-TOPS
I have tried to just add this if statement to the breadcrumbs.phtml
<?php if ($_crumbName != 'home' ){?>
Which seems correct but it isnt doing anything so i dont know if i have this in the wrong place or am just going about this wrong. I have entered my full code below.
$crumbsLevels = $this->getAllBreadcrumbs();
?>
<?php if($crumbsLevels && is_array($crumbsLevels)): ?>
<div class="breadcrumbs">
<?php foreach ($crumbsLevels as $crumbs): ?>
<?php if ($crumbName != home ){?>
<ul>
<?php foreach($crumbs as $_crumb): ?>
<li <?php if ((!empty($_crumb['category_id']) || count($crumbs) >4) && !$_crumb['last']) { ?>typeof="v:Breadcrumb"<?php } ?><?php if (!empty($_crumb['hidden'])) { echo 'style="visibility: hidden;"'; } ?>>
<?php if(!empty($_crumb['link'])): ?>
<a href="<?php echo $_crumb['link'] ?>" title="<?php echo $this->htmlEscape($_crumb['title']) ?>" <?php if (!empty($_crumb['category_id'])) { ?>rel="v:url" property="v:title"<?php } ?>><?php echo $this->htmlEscape($_crumb['title']) ?></a>
<?php elseif($_crumb['last']): ?>
<strong><?php echo $this->htmlEscape($_crumb['title']) ?></strong>
<?php else: ?>
<?php echo $this->htmlEscape($_crumb['title']) ?>
<?php endif; ?>
<?php if(!$_crumb['last']): ?>
<span> </span>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php }?>
<?php endforeach; ?>
</div>
<?php endif; ?>
I know i didnt mention the all categories but wanted to egt the Home link done first and i assume it will just be the same but using the category ID or the name 'All Categories'?
If someone could let me know where i am going wrong or what is should be writing in that would be great thank you.
home
in the if statement, so if it wasn't working for you you probably need to check your caches, and that you're actually using the template file that you're including.