How to override adminhtml phtml files in magento2?

I want to place a custom text in customer edit page welcome to magento2. For this I have created a theme and placed


<?php echo $block->getChildHtml(); ?>

but it's not working, when I place the same in app\code\Magento\Customer\view\adminhtml\templates\tab\view.phtml then it's working.

  • 1
    Do you enable custom theme for adminhtml aria?
    – KAndy
    Oct 15, 2015 at 14:34
  • did you get that working? Apr 21, 2016 at 14:06
  • @PhilippSander for adminhtml template files we have to create seperate theme for admin and edit template files same as front end module based structure Apr 25, 2016 at 9:15
  • thanks! already solved it myself with a different approach Apr 25, 2016 at 13:17
  • 6
    If you have solved, you should share how you solved it. That's how a community works.
    – rbncha
    Jul 12, 2016 at 17:39

2 Answers 2


adminhtml phtml file can be override as steps below

STEP 1: Add page layout XML in custom module.


<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceBlock name='order_totals'>
      <action method="setTemplate">
        <argument name='template' translate="true" xsi:type='string'>[Vendor]_[Module]::order/totals.phtml</argument>

STEP 2: Put template file on below path


Write custom code with existing content!!!

STEP 3: Depending on your cache settings you may need to clear your cache php bin/magento cache:clear

Hope it will work for you :)


I created a new module and copied the file to


it works.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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