Use custom template file for main page and magento product page

I want to use a custom template file for the magento homepage. I used the following code in the layout / local.xml file of my theme, as described in this tutorial

<new_layout translate="label">
    <label>New Layout</label>
    <reference name="root">
        <action method="setTemplate"><template>page/home.phtml</template></action>
        <!-- Mark root page block that template is applied -->
        <action method="setIsHandle"><applied>1</applied></action>
    </reference>
</new_layout>

But the path template tooltip shows the /3columns.phtml page. Anyone, please indicate the exact way to install one template on the home page and the other on the product page. Also, you want to delete the basket and compare the fields only from the sidebar of the main page and show it on other pages. I am using magento 1.4. 1

+3
source share
1 answer

, , . - CMS, , CMS. .

, <catalog_product_view>, catalog.xml. - :

<catalog_product_view>
    <reference name="root">
        <action method="setTemplate"><template>page/home.phtml</template></action>
        <!-- Mark root page block that template is applied -->
        <action method="setIsHandle"><applied>1</applied></action>
    </reference>
</catalog_product_view>
+1

Source: https://habr.com/ru/post/1752417/


All Articles