Memor-X
Memor-X

Reputation: 2970

How to remove breadcrumbs from homepage

When Full Page Cache is on the breadcrumbs show up on the home page,

i've tried changing the line <?php if($crumbs && is_array($crumbs)): ?> to <?php if($crumbs && is_array($crumbs) && !$this->getIsHomePage()): ?> in \app\design\frontend\enterprise\[THEME]\template\page\html\breadcrumbs.phtml yet it still shows up

i've tried adding <remove name="breadcrumbs" /> to the "Layout Update XML" of the CMS page which is the homepage yet it still shows up

I've tried putting in Mage::log() or a <p> before the if statement however it works on every other page but the home page

a google search gives me nothing that i don't know (the Layout Update XML thing i got from one site) and most results are asking how to add the breadcrumbs when i search for "how to remove breadcrumbs from homepage

i'm wondering if there is any other way to remove the breadcrumbs from the homepage which i may have yet tried

Upvotes: 0

Views: 1823

Answers (1)

Jonathan
Jonathan

Reputation: 1089

You can achieve this by using the code from your second paragraph but changing !$this->getIsHomePage() to

!Mage::getBlockSingleton('page/html_header')->getIsHomePage()

If that doesn't work (depends on your version of Magento: you should find the function getIsHomePage defined in ./code/core/Mage/Page/Block/Html/Header.php), then you can use the following instead.

$this->getUrl('') !== $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true))

Upvotes: 1

Related Questions