English 中文(简体)
How to change category page layout in Magento?
原标题:
  • 时间:2009-11-19 11:09:40
  •  标签:
  • magento

My problem is I want to change my category page layout similar as homepage I tried a lot but didn t get the answer.

问题回答

However, the best way to do this is to not edit catalog.xml, but page.xml

under , edit the first block you see there:

<block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">

change this to:

<block type="page/html" name="root" output="toHtml" template="page/2columns-right.phtml"> 

for further detail follow this link http://www.magentocommerce.com/boards/viewthread/16838/

Login to admin side

Catelog -> manage Categories -> Choose your category

Then on the tab section select Custom Design.

Change the Page Layout as what ever you want.

I am not sure if I understand your question. Anyways...

You can edit the category view at template/catalog/category/view.phtml.

If you require to use the 3 column layout like the home page, you need to assign the 3 column template in the catalog.xml file.

Edit catalog.xml from your /app/design/frontend/your_theme/default/layout/catalog.xml and in default block add a new reference block

<default>
...
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-right.phtml</template>
            </action>
        </reference>
...
</default>

In this way, you overwrite the root block in page.xml (the main layout file Magento loads)

There is an extension located at this thread that allows you to set the page layout for your categories





相关问题
Magento addFieldToFilter allow NULLs

When using the Magento collection method addFieldToFilter is it possible to allow filtering by NULL values? I want to select all the products in a collection that have a custom attribute even if no ...

Get product link from Magento API

I am new to Magento and using their API. I need to be able to get the product url from the API call. I see that I can access the url_key and url_path, but unfortunately that s not necessarily what ...

magento extension installation

I want to install a Magento extension in WAMP, but not from the Magento connect system. How can I do this? I have the module (extension) code and I already installed the sample data in the Magento ...

Link to a specific step in onepage checkout

Is it possible to redirect the browser to nth step in the onepage checkout? If so, how would one go about doing it? I m working on a payment module and have a sort of "cancel" action that i would ...

How do I filter a collection by a YesNo type attribute?

I have a ‘featured’ attribute, which has a Yes/No select-list as the admin input. I presume that the values for Yes and No are 1 and 0, as they are for every other Yes/No list. However, if I try and ...

热门标签