7

Situation

We have a breadcrumb block on our product details page. With multiple category trees directing users to a single product page, the breadcrumb trail should change depending on the category which made the referral.

In our case, if Full Page Cache (FPC) is disabled -- the Breadcrumbs are dynamic and it works like I described.

With FPC enabled, the breadcrumb gets fixed on the initial non-cached page request.

Question

How would I go about getting the breadcrumb block to be dynamic on the product page? It's perfectly fine if it's being cached on category results pages.

2

Add below code in etc/cache.xml file in your any module or make small module

<?xml version="1.0" encoding="UTF-8"?> 
<config>
    <placeholders>
        <catalog_breadcrumbs>
            <block>page/html_breadcrumbs</block>
            <name>breadcrumbs</name>
            <placeholder>CONTAINER_BREADCRUMBS</placeholder>
            <container>Enterprise_PageCache_Model_Container_Breadcrumbs</container>
            <cache_lifetime>86400</cache_lifetime>
        </catalog_breadcrumbs>
    </placeholders>
</config>

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.