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
  • Yes correct understood Commented Sep 19, 2018 at 15:55
  • Have you did this? Commented Mar 27, 2019 at 6:40

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? Commented Sep 19, 2018 at 15:52
  • you mean with custom module ? Commented Sep 19, 2018 at 15:53
  • Yes correct understood Commented 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 ? Commented Sep 19, 2018 at 16:11
  • nope,can you please write sample how to override that js? i don't know much about it. Commented Sep 19, 2018 at 16:25

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.