Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 3
[SOLVED] Custom Admin Theme
 
sosuke
Jr. Member
 
Total Posts:  24
Joined:  2008-06-12
 

How would I go about setting up and activating a custom admin theme? i’ve customized the admin theme and I really would like to set it up in an upgrade-friendly way. I’m sorry if this has already been discussed,...i searched and was unable to find any information. thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lazzymonk
Guru
 
Avatar
Total Posts:  391
Joined:  2008-04-03
England
 

as far as i have seen magento isnt really set up to use a different admin theme. If you are wanting to change the appearance of the admin area, i think the best way to do it would be edit the css of the current theme.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sosuke
Jr. Member
 
Total Posts:  24
Joined:  2008-06-12
 

Basically that’s what i did,...i was just wondering if there was a way of future proofing these changes against upgrades like you can do with frontend themes,...or if each time i upgrade i will have to overwrite the admin theme files?

 
Magento Community Magento Community
Magento Community
Magento Community
 
lazzymonk
Guru
 
Avatar
Total Posts:  391
Joined:  2008-04-03
England
 

i dont think there is any way to ensure that. maybe thats something that will be added in the future.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bott
Member
 
Avatar
Total Posts:  53
Joined:  2007-12-07
Provo, UT
 

You can setup a new admin theme, very similar to the way you do it for a frontend theme (add new folders/files in the package and theme locations in app/design/adminhtml and skin/adminhtml). Once that is in place, just override app/code/core/Mage/Adminhtml/etc/config.xml as app/code/local/Myname/Adminhtml/etc/config.xml and add the following code to it:

<config>
    <
stores>
        <
admin>
            <!-- default 
admin design package and theme -->
            <
design>
                <
package>
                    <
name>newpackage</name>
                </
package>
                <
theme>
                    <default>
newtheme</default>
                </
theme>
            </
design>
        </
admin>
    </
stores>
</
config>

Also note you will need to enable your new module before the changes are recognized.

 
Magento Community Magento Community
Magento Community
Magento Community
 
frenske
Jr. Member
 
Total Posts:  7
Joined:  2008-08-13
 

How can I enable this new theme?
I suspect i’ve to declare this in a config.xml somewhere. But i don’t know whichone and how to define this new admin theme.
Thanks in advance!

 
Magento Community Magento Community
Magento Community
Magento Community
 
harkman
Member
 
Avatar
Total Posts:  60
Joined:  2008-01-06
Ravensburg, Germany
 
frenske - 30 September 2008 11:45 PM

How can I enable this new theme?
I suspect i’ve to declare this in a config.xml somewhere. But i don’t know whichone and how to define this new admin theme.
Thanks in advance!

Read here http://www.magentocommerce.com/wiki/groups/174/changing_and_customizing_magento_code#custom_modules

 
Magento Community Magento Community
Magento Community
Magento Community
 
lbeetles
Member
 
Total Posts:  66
Joined:  2009-02-04
 

seems an extenstion has been developed but only at alpha status at the moment.

http://www.magentocommerce.com/extension/1086/admin-theme

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt Dean
Guru
 
Avatar
Total Posts:  549
Joined:  2008-05-27
 

Thanks bott - very useful.

For those of you who already have your own module up and running with its own config.xml, it’s your existing one that you need to edit.
(I wasn’t sure from bott’s instructions whether this needed an additional config.xml somewhere or not. It doesn’t if your module already has one)

I just put:

<stores>
    <
admin>
        <
design>
             <
theme> <!-- force admin theme to be 'mytheme' -->
                 <default>
mytheme</default>
             </
theme>
        </
design>
    </
admin>
</
stores>

into my existing config.xml and it worked nicely.

Thanks again,
Matt

 
Magento Community Magento Community
Magento Community
Magento Community
 
benz001
Sr. Member
 
Avatar
Total Posts:  238
Joined:  2009-02-05
Sydney
 

Hi all,

For some reason I’m bashing my head against this - so a couple of questions for the brains trust:

1. Does this still work with 1.3.x ?

2. I’m trying to just do a simple local override of the Mage config rather than using a new module, does this work?
All I want to do is change a couple of lines in boxes.css so I’ve made the following changes in
app/code/local/Mage/Adminhtml/etc/config.xml

<config>
    <
stores>
        <
admin>
            <!-- default 
admin design package and theme -->
            <
design>
                <
theme>
                    <default>
peas</default>
                </
theme>
            </
design>
        </
admin>
    </
stores>
</
config>
As you can see my new admin theme is called ‘peas’ so I make a skin/adminhtml/default/peas folder, then I copy boxes.css to skin/adminhtml/default/peas/boxes.css I make my edits to this one file.

And....nothing happens - Is there a step I’ve missed?
I’ve also manually deleted the /var/cache files in case the admin caching isn’t controlled by the same menu options as the front end with no change.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Olof
Sr. Member
 
Total Posts:  152
Joined:  2008-10-17
 

Benz, did you get this to work?

 
Magento Community Magento Community
Magento Community
Magento Community
 
benz001
Sr. Member
 
Avatar
Total Posts:  238
Joined:  2009-02-05
Sydney
 

No I didn’t I’m afraid, stopped looking into it after that post and just quickly changed the admin skin files to get through our client review - I’ll have to revisit this before the site goes into production however.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ubukus2
Member
 
Total Posts:  34
Joined:  2008-09-19
 

The solution steps proposed here don’t work on my 1.3.2.3 version.

Any idea why ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ubukus2
Member
 
Total Posts:  34
Joined:  2008-09-19
 

Ok for 1.3.2.3 it works in ./app/etc/local.xml

Just add the above line, this file won’t be modified during magento upgrade.

 
Magento Community Magento Community
Magento Community
Magento Community
 
benz001
Sr. Member
 
Avatar
Total Posts:  238
Joined:  2009-02-05
Sydney
 

Thanks Ubukus2, that was what I’d stuffed up - working perfectly now in 1.3.2.4.

 
Magento Community Magento Community
Magento Community
Magento Community
 
maltblue
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2010-03-24
London
 

The solution works really well in 1.4.0.1 CE. Thanks people.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 3