Magento 2, Magento Development, Customization, Extension Development and Integration, Optimization, SEO and Responsive Design

Magento 2, Magento Development, Customization, Extension Development and Integration, Optimization, SEO and Responsive Design

How to call custom module's phtml file into core phtml file of magento

This basic question for many people that how to call core phtml file into custom module. Before few days i have no answer. But today i have. If you want to call any custom file into for custom module's phml file you can do it as following.

In this example i call core list.phml into my custom module file.

<catalog_category_layered translate="label">
        <reference name="product_list">
            <action method="setTemplate">
                <template>customoption/customoption.phtml</template>
            </action>
        </reference>
</catalog_category_layered>

See how it works. customoption is my module name and customoption.phtml is my module phml file. And i replaced my default magento list.phml file with my module's phtml file. So suppose if you open your list page it will saw what ever in my customoption.phtml.


Please support us, Like us on Facebook.

0 comments:

Post a Comment

 

Copyright @ 2017 HKBlog.