3

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

  • Have you tried to <remove name="breadcrumbs"/> from cms_index_index\root of your local.xml? – user487772 Feb 17 '13 at 23:50
  • @Tim is this local.xml file the one located in app/etc cause i look in there and i can't find anything relating to cms_index_index\root in there and there's no such file located in any of the layout folders in app/design/frontend – Memor-X Feb 17 '13 at 23:59
  • google.com/… – user487772 Feb 18 '13 at 7:24
7

What Tim means is your local.xml file inside your template directory like /app/design/frontend/default/YOURTEMPLATE/layout

If the file does not exist, create it with the following content:

<?xml version="1.0"?>
<layout version="0.1.0">
<cms_index_index>
    <reference name="root">
        <remove name="breadcrumbs"/>
    </reference>
</cms_index_index>
</layout>

This should work. Also refresh cashes.

  • yep, that seems to be working now, thanks – Memor-X Feb 18 '13 at 21:19
  • I have just had the same problem, this solution worked, but my question is what did you do to find out you need to target the <cms_index_index> node? – tony09uk Nov 29 '13 at 15:57
  • every action method has a default layout handle associated to it. the action which renders the store homepage is inside the indexcontroller of the mage_cms module. see app/code/core/Mage/Cms/controllers/IndexController.php-> indexAction(). the handle basically is <frontname_controllername_actionname>. magento also adds a class to your <body ..> tag corresponding to that handle (cms-index-index). so the easiest way to find the node for a particular page would be to view the page source in your browser and look at the associated body class. – mnp Dec 2 '13 at 15:44
3

If you want to remove breadcrumbs on every CMS Pages, try removing from System-->Web-->Default Pages-->Show Breadcrumbs for CMS Pages

  • i didn't know about that option, however since we have CMS pages for other sections and we want breadcrumbs for them changing that option will affect more than just the homepage but it's useful to know about it – Memor-X Feb 18 '13 at 21:18
0

Magento Add Breadcrumbs For CMS Page check this link you can add in single cms page Breadcrumbs follow below code.

you can added this code in you cms page. edit your cmspage ->design->Layout Update XML->

<reference name="root">
<action method="setTemplate"><template>page/category.phtml</template></action>
 <action method="unsetChild"><alias>breadcrumbs</alias></action>    
    <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs">
        <action method="addCrumb">
            <crumbName>Home</crumbName>
            <crumbInfo><label>Home</label><title>Home</title><link>/</link></crumbInfo>
        </action>
        <action method="addCrumb">
            <crumbName>About us</crumbName>
            <crumbInfo><label>SHOP</label><title>SHOP</title></crumbInfo>
        </action>      
    </block>
</reference>

this code for breadcrumbs my page name is shop add title shop and also change label shop

<action method="unsetChild"><alias>breadcrumbs</alias></action>    
    <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs">
        <action method="addCrumb">
            <crumbName>Home</crumbName>
            <crumbInfo><label>Home</label><title>Home</title><link>/</link></crumbInfo>
        </action>
        <action method="addCrumb">
            <crumbName>About us</crumbName>
            <crumbInfo><label>SHOP</label><title>SHOP</title></crumbInfo>
        </action>      
    </block>

I think you can help this code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.