Setting custom Admin theme from a Module

Last modified by resonance on Fri, June 25, 2010 07:10
Source|Old Revisions  

This is an old revision of the document!

Frontend templates are simple to change via Admin, from default/default to default/mytheme. The Admin templates take a little more work, but it’s easy to do. This method was tested under Magento

These steps apply within a Magento module. There are many tutorials on creating a basic module, so we will not repeat it here. All you need are the basic module directories, the module’s xml file under /app/etc/modules, and a skeleton config.xml for your module.

Create a Theme Directory

Create a directory for your theme /app/design/adminhtml/default/mytheme and copy any templates, layouts, and locale you need. This works the same way as the frontend themes.

Edit your config.xml

In your config.xml file, under the <config> section, add this:

  1. <admin>
  2.     <design>
  3.         <package>
  4.             <name>mytheme</name>
  5.         </package>
  6.         <theme>
  7.             <default>mytheme</default>
  8.         </theme>
  9.     </design>
  10. </admin>