Magento's Theme Hierarchy--Changes in CEv1.4 and EEv1.8

Last modified by kara on Sun, June 27, 2010 16:21
Source|Old Revisions  

This is an old revision of the document!

Magento’s theme architecture was changed between Community Edition (CE) v1.3 and CE v1.4 and between Enterprise Edition (EE) v1.7 and EE v1.8 to make custom themes easier to maintain and more “upgrade proof.” In these releases the theme files were also refactored and changed considerably to improve performance and accessibility, but the biggest change was to the overall theme structure and hierarchy used by Magento.

This article describes the new Magento theme structure and hierarchy and how it impacts custom theme development. It’s intended for designers and developers who worked with Magento themes in CE v1.3 and EE v1.7 and before and who need to understand the changes.

The Base Package

Introduced in CE v1.4 and EE v1.8 was the “base” package and a change to Magento’s design fall-back hierarchy that makes the base/default theme a true cross-package fallback option. The role of the base package is to provide hooks to all of Magento’s core functionality, so that custom themes can include in them just the changes to that core functionality that are specific to the design or business they’re intended to support. This provides a cleaner codebase and a better upgrade path for your themes.

In the directory structure, the base package is located at: app/design/frontend/base/default/ contains all of the layout and template files necessary to support core Magento functionality. skin/frontend/base/default/ contains some CSS and Javascript files, which support core functionality. It does not, however, contain all of the CSS and image files necessary to style a site, because those are specific to a design and not to the core.