1

I use sm_market default template, purchased from themeforest. Here you can find the link: http://themeforest.net/item/market-premium-responsive-magento-theme-/8945695 I am trying to modify the header of my Magento 1.9.1 template on the product page. I have 2 templates that I want to use. First is header.phtml(default) which is already assigned to homepage and all other pages which is fine. Second is header4.phtml which I want to use only on product page.

Header templates are located under:

/public_html/app/design/frontend/sm_market/default/template/page/html

So, I have created a layout.xml file under:

/public_html/app/design/frontend/sm_market/default/layout/local.xml

In the local.xml file I have added the following updates:

<my_handle> <!-- create custom handle to avoid duplication -->
    <reference name="header">
        <action method="setTemplate">
            <template>page/html/header4.phtml</template>
        </action>
    </reference>
</my_handle>

<catalog_product_view>
<update handle="my_handle" />
</catalog_product_view>

As you can imagine, this doesn't work. What did I do wrong?

How do you normally change header template only for specific page? (in my case catalog_product_view)

Megadeth
  • 11
  • 1
  • 3

1 Answers1

2

The below worked for me (1.9.1.0)

<catalog_product_view>
    <reference name="root">
        <block type="page/html_header" name="header" as="header" template="page/html/header4.phtml"/>
    </reference>
</catalog_product_view>
Jason
  • 51
  • 4