tags:

views:

29

answers:

2

Hello, I am new to Magento, and I have created list1.phtml in Magento with some changes to the file list.phtml. My problem is that I want to call list1.phtml like list.phtml. I copied the code of list.phtml from catalog.xml and created a new content block for list1.phtml but it doesn't work for me. Please help.

Actually, I want a page in Magento that only shows 5 product rows, and all other pages are the same with 3 products. I am overriding list.phtml to list1.phtml according to my needs but it doesn't work for me.

Sorry for my English.

Thanks in advance,

-Jeet

+1  A: 

One option would be to create a new template by creating a new folder inside /app/design/frontpage/default. Copy the list.phtml there keeping the directory structure intact. Then choose this newly created template in the custom design section for the category that you want this custom list.phtml to apply to.

Let me know if any of the above requires more clarification and I will be more than happy to help you out further.

silvo
jeet, @silvo is suggsting that you create a new folder at `/app/design/frontpage/default/seconddesign/template/catalog/product` and copy your `list.phtml` into there. Then, in the web admin interface of Magento, go to `Catalog>Manage Categories` and select the category you want to change. Click the `Custom Design` tab within that category and choose "seconddesign" from the drop-down.
Jonathan Day
I couldn't put it any better, thanks Jonathan :)
silvo
A: 
             <reference name="content">     
        <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">    
            <block type="catalog/product_list1" name="product_list1" template="catalog/product/list1.phtml">
                <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                    <block type="page/html_pager" name="product_list_toolbar_pager"/>
                </block>
                 <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
                <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
                <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
                <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
                <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
                <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
                <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
            </block>
        </block>
    </reference>          
    <!--CODE END-->
div
You need to leave the block's `type` attribute the same as for list.phtml, so it would be:`<block type="catalog/product_list" name="product_list1" template="catalog/product/list1.phtml">`.
Jonathan Day
Thanks*n times all of you guys you all have solved my problem..
div
Special thanks to you Jonathan you rock buddy..
div