2

How to Override my Admin PHTML, XML and LESS/CSS file in my theme.

Any one have Idea ?

  • Create a new admin theme extending form the theme that you Want to override and the change then like we normally override – Vishwas Bhatnagar Feb 2 '17 at 5:14
0

see this link to override adminhtml theme and this link to override css,js files.

0

I am assuming you need your theme specific functionality that needs changes in the Admin panel.

Under $MAGENTO_BASE_DIR/app/code, create a Vendor>/Theme> directory. Under that create a view/adminhtml. Underneath you can the create templates directory for your phtml, layout directory for your XML and web directory Less/CSS

Basically

app/code/<Vendor>/<Theme>/view/adminhtml/web
app/code/<Vendor>/<Theme>/view/adminhtml/layout
app/code/<Vendor>/<Theme>/view/adminhtml/templates
app/code/<Vendor>/<Theme>/view/adminhtml/ui_component

If you are creating a new theme for the Admin, you cal follow the Magento documentation for creating admin theme

  • Which was the better way to override admin PHTML, XML and LESS/CSS. 1. Create new theme OR 2. Create new folder under $MAGENTO_BASE_DIR/app/code, – hweb87 Feb 2 '17 at 6:29
  • That depends on your situation. If I am writing functionality, say for example megamenu and providing configuration options under MegaMenu in AdminHtml specifically for my extension, then I will use the new folder under app/code/Vendor/Theme option. On the other hand if I am changing the existing admin options, I will go with creating new admin theme and overriding the way we normally override. – rajeshrajan Feb 2 '17 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.