Overriding Magento admin theme files

We create a new theme and assign it in the Magento admin to override the frontend theme. What if you need to override the admin theme file? Edit the default magento file? No, its not a good practise.

Here how you can override the Mageno admin theme files:

  1. Suppose you admin theme name is “myadmintheme”.
  2. Create “app/design/adminhtml/default/myadmintheme” folder parallel to the magento admin theme folder
  3. Create “layout” and “template” folders inside it
  4. Copy the files from “default/layout”  and “default/template” folder you want to modify to “myadmintheme/layout” and “myadmintheme/template” following the folder structure, do the changes required.
  5. Create a new magento module or add the following code to an exiting modules config.xml file

<config>
.
.
<stores>
<admin>
<!--  default admin design package and theme -->
<design>
<package>
<name>default</name>
</package>
<theme>
<default>myadmintheme</default>
</theme>
</design>
</admin>
</stores>
.
.
</config>

Comments

Leave a Comment

Back to top