1
我使用從themeforest購買的sm_market默認模板。在這裏你可以找到鏈接:http://themeforest.net/item/market-premium-responsive-magento-theme-/8945695 我想修改產品頁面上我的Magento 1.9.1模板的標題。我有兩個我想使用的模板。首先是已經分配給主頁和所有其他頁面的header.phtml(默認),這是罰款。其次是header4.phtml,我想在產品頁面上使用只有。僅在產品頁面上更改magento標題模板
頁眉模板位於:
/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)