Source : Magento Code Snippet – Do not Show Homepage in Breadcrumbs.
Pour supprimer l’affichage du lien Homepage dans le fil d’Ariane d’un site Magento, il faut ajouter une condition if
dans app/design/frontend/[yourtheme]/[yourtemplate]/template/page/html/breadcrumbs.phtml
(ligne 06 dans le bout de code ci-dessous).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<?php if($crumbs && is_array($crumbs)): ?> <div> <ul> <?php foreach($crumbs as $_crumbName=>$_crumbInfo): ?> <?php // do not show homepage in breadcrumbs ?> <?php if($this->getUrl('') != $_crumbInfo['link']): ?> <li> <?php if($_crumbInfo['link']): ?> <a href="<?php echo $_crumbInfo['link'] ?>" title="<?php echo $this->htmlEscape($_crumbInfo['title']) ?>"><?php echo $this->htmlEscape($_crumbInfo['label']) ?></a> <?php elseif($_crumbInfo['last']): ?> <strong><?php echo $this->htmlEscape($_crumbInfo['label']) ?></strong> <?php else: ?> <?php echo $this->htmlEscape($_crumbInfo['label']) ?> <?php endif; ?> <?php if(!$_crumbInfo['last']): ?> <span>/ </span> <?php endif; ?> </li> <?php endif; ?> <?php endforeach; ?> </ul> </div> <?php endif; ?> |