Hello friends, I was watching a site (http://www.pickormiss.com/). I found that when I click on homepage, product list is coming from list.phtml file It comes from:


when I click on any product category i.e. top menu then page comes from list.phtml through view.phtml i.e. from




I want to know if these two pages are coming from same list.phtml. how it is possible that these are showing different things like different heading, logo etc?

Please explain this list.phtml file


If I understand your question correctly, you're curious as to how the list.phtml file is capable of displaying 2 different layouts? Well, take a look at list.phtml and it should become clear. It's by default written to handle 2 modes, "Grid" and "List". You can change the default within the administration panel (System -> Configuration -> Catalog -> Frontend).

Typically, it's accompanied by a toolbar with sorting capabilities (Sort by name/price etc) and the ability to switch views from Grid to List mode and back again, although this feature appears to have been removed on the site in question. By the looks of it, that website is displaying the bestsellers on the homepage in a Grid format, but the products within the categories as a List format.

Open the default list.phtml and take a look. As for catalog/category/view.phtml well this file handles the "header" area of a category, i.e. the title and any description or images you might have set (Catalog -> Manage Categories -> select category -> General Information). At the end of this file is a simple conditional statement to decide whether to show products, static blocks or both - which again are achievable by altering settings in the administration panel (Catalog -> Manage Categories -> select category -> Display Settings -> Display Mode).

Hope this helps.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.