Learning Magento Theme Development
上QQ阅读APP看书,第一时间看更新

Creating a new Magento theme

As you saw in Chapter 1, Introduction to Magento and Magento Themes, a Magento theme can encompass very few files or a large number of files.

Firstly, create the new directories in your Magento installation to contain your new theme's files:

  • app/design/frontend/default/m18/template
  • app/design/frontend/default/m18/layout
  • app/design/frontend/default/m18/locale
  • app/design/frontend/default/m18/etc
  • skin/frontend/default/m18/css
  • skin/frontend/default/m18/images
  • skin/frontend/default/m18/js

Once you have created these directories, you can create a file called styles.css in the skin/frontend/default/m18/css directory. To be able to test that your new skin is enabled, add the following to your styles.css file:

body {
background: red;
}

Tip

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Your next step is to enable your newly created Magento theme!