仅在产品页面上将magento页眉模板更改为


Change magento header template only on product page

我使用sm_market默认模板,之前从他们那里购买。您可以在这里找到链接:http://themeforest.net/item/market-premium-responsive-magento-theme-/8945695我正在尝试修改我的Magento 1.9.1模板在产品页面上的标题。我有两个模板,我想使用。第一个是header.phtml(默认),它已经分配给主页和fine的所有其他页面。第二个是header4.phtml,我只想在产品页面上使用

标题模板位于以下位置:

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

因此,我在以下位置创建了一个layout.xml文件:

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

在local.xml文件中,我添加了以下更新:

<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>

你可以想象,这是行不通的。我做错了什么?

您通常如何仅为特定页面更改页眉模板?(在我的案例中为catalog_product_view)

以下内容适用于我(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>