2

I've got file :

"vendor/magento/module-ui/view/base/web/templates/grid/listing.html"

after deploy this file create:

"pub/static/adminhtml/Magento/backend/en_US/Magento_Ui/templates/grid/listing.html"

I want edit this file but there is problem when i create:

"app/design/adminhtml/{..}/{..}/Magento_Ui/web/templates/grid/listing.html"

after deploy file in static/adminhtml not change (still this file is same to vendor file).

Is there any other way to override this file or maybe i creating wrong path?

4
  • Delete the content and then deploy. It will work.
    – user55548
    Nov 13, 2018 at 10:50
  • Why are you creating the file in app/design/frontend folder? Nov 13, 2018 at 10:59
  • After delete content still is created file from "vendor/magento/module-ui/view/base/web/templates/grid/listing.html"
    – BotGun
    Nov 13, 2018 at 11:07
  • @MohitKumarArora Because after create file in adminhtml havent any action.
    – BotGun
    Nov 13, 2018 at 11:15

2 Answers 2

1

try below code it will override listing.html

Create requirejs-config.js under Vendor/ModuleName/view/adminhtml with following code.

var config = {
map: {
    '*': {
        'ui/template/grid/listing.html':'Vendor_ModuleName/template/grid/new-listing.html'
    }
}

};

and create new-listing.html file under Vendor/ModuleName/view/adminhtml/web/template/grid with your changes and after that fire following command

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
1

To override file of admin theme, You can create your own admin theme by making parent theme as a magento default admin theme (Magento/backend).

Follow below tutorial for create your own admin theme.

http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/admin_theme_create.html

Your Answer

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

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