I have custom theme for magento. I made some modification in local.xml file which works fine, but I would like to made modification who won't be overwrite after update.

I made a new xml file (mod.xml) and insert it to my theme layout folder - how to run it on site?

<?xml version="1.0"?>
<layout version="0.1.0">

    <!-- move the cookies info block from the bottom block to the top -->
    <reference name="before_body_end">
        <action method="unsetChild">

    <reference name="after_body_start">
        <block type="page/html_cookieNotice" name="global_cookie_notice" as ="global_cookie_notice" template="page/html/cookienotice.phtml" before="-" />


Thank for help.

1 Answer 1


You have to create your own module. In the config.xml of your module, you can define your custom xml file. This will add your custom theme file to the layout xml.

<?xml version="1.0"?>
  • Whole new module for one modification? Is there any tutorial how to build new SIMPLE module?
    – Adrian
    Commented Mar 24, 2014 at 13:32
  • Here's a tutorial on how to create a new module: alanstorm.com/magento_config You only need the 'bare-bones' setup and update the config.xml according to my example above.
    – Vicky
    Commented Mar 24, 2014 at 13:51
  • I found this site silksoftware.com/magento-module-creator - it generate whole module itself. With your code works like I want to - Thanks!
    – Adrian
    Commented Mar 24, 2014 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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