Michel Arteta
Michel Arteta

Reputation: 1384

Magento 1 page layout

enter image description hereI wanted to change the layout of only one page, which is the category page. I edited the catalog.xml line 187 from 2-columns-right to 1-column but it edited my product page. My question is how can I edit only the category page (where shows all products within a category, see image attached)

Upvotes: 0

Views: 185

Answers (1)

benmarks
benmarks

Reputation: 23205

You should never modify core files in place, and it is best practice to avoid overriding and customizing core layout files in custom themes. Rather, you should use the local.xml layout file. There is a great tutorial on layout XML customization at MageBase.com.

local.xml is being merged into the compiled layout configuration DOM last among all layout XML files, giving its directives a certain authority over others. You should try the following content:

<?xml version-"1.0"?>
<layout>
    <catalog_category_view>
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-right.phtml</template>
            </action>
        </reference>
    </catalog_category_view>
</layout>

Remember to clear/disable the layout XML cache while developing.

Upvotes: 1

Related Questions