Get Free Audit

Theming Related Directory Structure in Magento

Nov 23, 2017

793 David Narbutovich

Theming Related Directory Structure in Magento

Today we’re discussing one of the relevant questions every Magento developer should be aware of. You’re suggested to learn the current theme structure in Magento as well as theme files search. Hope you’ll find it worthwhile.

What is the purpose of packages

Packages help us arrange a theme in such a convenient manner as it thinks fit. Besides, it allows making themes distinguished to be used for different stores. When performing it, some files are changed and the files which are not found will be inherited from a parent theme. Actually, it saves us the trouble of duplicating templates/static files.

As for Magento up to 1.9, the theme inheritance looks like this:

<package>/<mytheme> -> <package>/default -> base/default

With the release of Magento 1.9, a new feature was implemented. Now it’s possible to configure a parent theme manually with the file etc/theme.xml, where you can specify a parent theme. For example,

Andrey_Dubina
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey

What is the purpose of the theme fallback

The theme fallback is aimed at maintaining your Magento store while you’re upgrading it in order to avoid any breakdowns. If there was no theme fallback, we would have to change Magento files with possible negative consequences.

What is the purpose of separating the skin and the design files

The reason why the folder “skin” is placed in another directory is closely connected with a security issue, as static files should be accessed directly, while folder content is hidden. Moreover, it can help to reduce the nesting level.

Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *