Snippets with the tag: admin

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 URL

Description

Changing the Admin URL: Open the /app/etc/local.xml file, locate the <frontName> tag, and change the ‘admin’ part it to something a lot more random.

Code

<frontName><![CDATA[this-is-the-new-url]]></frontName>

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>