Skip to content

Magento Custom Module Directory Help

Old user, Noob question!

I have a module which is successfully “trying” to overide the sidebar.html block using the below code.

var config = {
    "map": {
        "*": {
          "Magento_Checkout/template/sidebar.html": "MyBrand/MyModule/template/sidebar.html"
        }
    }
}; 

The problem is, I’m not sure where in my module directory to place the actual replacement file ie.

in app/code/MyBrand/MyModule or app/design/MyBrand/MyModule or somewhere else.

I have tried several places for this file “sidebar.html” and several directory references but no joy. The GET command fails to locate the replacement file. I can’t quite understand how Magento sees or starts from when using this directory.

Update command, deploy and cache clear run after every attempt.

Any help greatly appreciated.

Cheers