1

What are the advantages of created MyPackage/MyTheme instead of default/MyTheme ?

Since app/design/frontend/default/default is almost completely empty (no template folder, no local.xml) we could customize files here.

In skin/frontend/default/default no customizations or they will be overwrite in case of magento update. So we could do our customizations in default/MyTheme.

So the only disadvantage with default/MyTheme is that the skin/frontend/default/default fallback would be useless.

I guess there is others reasons of created MyPackage/MyTheme as recommended by Magento but i can't figure out them.

1 Answer 1

1

Up until 1.9CE you got better theme fallback creating theme under default/mytheme:

default/mytheme -> default/default -> base/default

with mypackage/mytheme you get:

mypackage/mytheme -> mypackage/default -> base/default

This means if you wanted templates and layout etc to fall back to the default/default theme you would need to create mypackage/default being an exact duplicate of default/default. So it's more efficient to create your theme under default/mytheme. 1.9CE however introduces infinite theme fallback which makes this point irrelevant as you can now define which theme you want your theme to fallback to. This is done very simply in app/design/frontend/mypackage/mytheme/etc/theme.xml where you can use something along the lines of the following:

<?xml version="1.0"?>
<theme>
    <parent>default/default</parent>
</theme>

So before 1.9CE you get better fallback creating a theme under the default package, but from 1.9CE onwards there is no advantage/disadvantage either way, just create the theme wherever you prefer.

1
  • Thanks Jonathan. So in the end if we don't need a theme in default package then we create our custom package. It's more clear. I didn't know about the infinite theme fallback in 1.9CE, that's nice :)
    – Lanks
    Commented Oct 15, 2014 at 16:24

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.