Snippets with the tag: design

Check request from frontend or backend

Description

Check whether request is coming from frontend or backend.

Code

if(Mage::app()->getStore()->isAdmin() && Mage::getDesign()->getArea() == 'adminhtml'){
        //request is from backend/admin
} else {
        //request is NOT from backend/admin
}

Changing the admin theme

Description

Changing the admin theme in local xml

Code

<config>
    <stores>
        <admin>
            <design>
                 <theme>
                     <default>yourtheme</default>
                 </theme>
            </design>
        </admin>
    </stores>
</config>