I have a module. In config.xml i found this code:


Why we must write it? What I should do, if I want use this module in other layout?


Layout XML

Layout XML files can be found in app/design/frontend/[package]/[theme]/layout. Each Magento module may define its own layout XML file in the config.xml file.


Before the page is rendered, Magento loads all configured layout update files and its design updates to determine which block is to be rendered at which location.

source : Complete example on layout

To know in deep read Layout Update If you are creataing template lets say for home page or checkout page than in we define the layouts in our moudle layout file like/var/www/html/psydro16/app/design/frontend/base/default/layout/mymodule.xml`

<cms_index_index translate="label">
  <reference name="bottom.container">
     <block type="mymodule/mymoduletemplate" name="mymodule_mymoduletemplate" template="reviews/mymoduletemplate.phtml" />

This way we call our module template in that layout.

  • Ok, but if i wanna use this module in other layout? – Павел Кушнеревич Mar 26 '18 at 10:20
  • @ПавелКушнеревич i updated my suggestion, is that solves your concern – inrsaurabh Mar 26 '18 at 10:27
  • @ПавелКушнеревич If it help , you can mark the answer or we will try to update the answer so that it help other community member to follow the right suggestion. – inrsaurabh Mar 26 '18 at 10:57
  • @inrasaurabh ty , it help – Павел Кушнеревич Mar 27 '18 at 6: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.