1

i want to override following file in my custom module so that when magento admin sales grid renders this template from vendor it would take file from my module:

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

Can anyone let me know how to achieve this?I have tried with requirejs-config.js mapping but its not working anymore

2

1 Answer 1

2

To override the template you just need to create Magento_Ui directory in your theme folder and place file in that folder.

like :

app/design/frontend/vendor/theme/Magento_Ui/web/templates/grid/listing.html

now you can update / edit as you require.

6
  • I don't want to do with theme,can we do with module?I mean inside app/code/vendor/module? Sep 19, 2018 at 15:52
  • you mean with custom module ? Sep 19, 2018 at 15:53
  • Yes correct understood Sep 19, 2018 at 15:55
  • did you try to override to map and override this file ? /vendor/magento/module-ui/view/base/web/js/grid/listing.js and update " template: 'ui/grid/listing', to your desired template ? Sep 19, 2018 at 16:11
  • nope,can you please write sample how to override that js? i don't know much about it. Sep 19, 2018 at 16:25

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.