Take the 2-minute tour ×
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It's 100% free, no registration required.

I've built a template by creating and editing the following file: frontend/mypackage/default/layout/local.xml

I have a store view site1, and wish to make exceptions on the default local.xml of mypackage, so this file: frontend/mypackage/site1/layout/local.xml

However, as soon as I create this file, Magento skips the default local.xml changes.

How do I tell Magento to use the local.xml from default, and add the changes in site1's local.xml to that?

Thanks in advance.

share|improve this question
    
No way. Sorry. Good question by the way. –  Tim Bezhashvyly Apr 1 at 16:36
    
I'm facing this exact same scenario. I was to extend the local.xml from the default theme, not completely replace it. It's too bad it replaces it entirely with the selected sub-theme. –  Axel Apr 1 at 20:48
    
Is there nothing like a default.xml? Or could we hack the Magento core code which traverses the xml-files, to also check for a default.xml? –  Gerard Nijboer Apr 2 at 6:23

2 Answers 2

Magento does not merge local.xml changes from other local.xml files. The way Magento theme fallback works is that any file found in the current theme/package will be preferred and used over any other theme/package file similarly named.

In this way you cannot create a merged override. This will be possible in Magento 2, but is not possible in Magento 1.x.

Unfortunately you will have to copy it to your local theme from the default and make your modifications there.

Best of luck.

share|improve this answer
2  
+1. This can be surely achieved programatically but definitely will not be worthy of an effort. –  Tim Bezhashvyly Apr 1 at 16:35

Phil is absolutely right but theoretically there is a workaround (not that pretty though).

You can create a custom module which will introduce the layout update. Then in the module you can check if the store view is not the one that is required and remove this layout update.

The bad thing about this approach is that you will hardcode the store view. And overall this doesn't look pretty.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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