1

I am overriding this file

vendor\magento\module-backend\view\adminhtml\templates\widget\grid\extended.phtml


I am overriding it in

app\code\Vendor\Module\view\adminhtml\templates\widget\grid\extended.phtml

Since it a template file i also need to create backend_widget_grid.xml at

app/code/{Vendor}/{Module}/view/frontend/layout/

with the following content

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="widget.extended">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">{Vendor}_{Module}::widget/grid/extended.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

But I am not sure if the referenceBlock or if the backend_widget_grid.xml name I am entering is incorrect since my edit doesn't show?

1 Answer 1

2

You want to override a admin template but, you put it in frontend !

Try this:

app/code/{Vendor}/{Module}/view/adminhtml/layout/

instead of :

app/code/{Vendor}/{Module}/view/frontend/layout/

3
  • Thank you for the response and yes the path should be changed of the xml file but is there something incorrect with it because my edits still don't show Commented Mar 21, 2018 at 19:19
  • 1
    Put also the new template in adminhtml : app/code/{Vendor}/{Module}/view/adminhtml/templates/
    – PЯINCƎ
    Commented Mar 21, 2018 at 19:21
  • I uptaded the comment because I forgot to mention it. Thanks for the reminder but something else is wrong :/ Commented Mar 21, 2018 at 19:31

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.