I want to call my custom app/design/frontend/default/default/template/mytheme/catalog/product/list.phtml file instead of base/default/template/catalog/product/list.phtml

The list.phtml file is same as in base, but i have added some conditions for price.

I have my custom XML file at app/design/frontend/default/default/layout/mycustom.xml

I have used below code in my xml but no luck and is still calling the list.phtml file from base

            <reference name="content">
                <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml" />

How can I do this using XML ?


You cant do that using a XML file. You should configure your theme from Configuration - Design or from System - Configuration - General - Design. Here is a full guide to achieve that.

  • I am working a custom extension whereby if the extensino is enabled then base/list.phtml will be replaced by my list.phtml
    – Jordan
    Aug 1 '14 at 12:44
  • There is no real need to create an extension, the theming in Magento is flexible enough to have your particular case considered.
    – mbalparda
    Aug 1 '14 at 12:46
  • I want to replace by list.phtml instead of base's. Do I need to put that file under base/default/template/catalog/product/list.phtml ?
    – Jordan
    Aug 1 '14 at 12:47
  • That is one of the bad practices we try to avoid. Any change in the base theme will be overwritten in any Magento update. Use the guide i sent you to achieve this.
    – mbalparda
    Aug 1 '14 at 12:49
  • But I am not using any theme to configure. Its just an extension which replaces list.phtml with my custom code. Do I really have to configure theme for the same ?
    – Jordan
    Aug 1 '14 at 12:56

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.