Magento 2 – Overriding Template Not Working

magento2templatetheme

I have created a new theme and i'm trying to override a template (same example as Magento Developer guide

http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/templates/template-sample.html)

so i just added this file

magento2/app/design/frontend/Plata/platatheme/Magento_Checkout/web/templates/minicart/content.html

and changed something as they suggest. Then i reloaded and nothing changed, it always load the old version.

I removed all files from pub/static, run magento setup:static-content:deploy and flushed both magento and browser cache.

I checked in

pub/static/frontend/Plata/platatheme/en_US/Magento_Checkout/templates/minicart/content.html

and there is my version of the file.

Should i run some more commands from the terminal?

Best Answer

I think your File Path Mismatch

Your File path

magento2/app/design/frontend/Plata/platatheme/Magento_Checkout/web/templates/minicart/content.html

Change Like:

magento2/app/design/frontend/Plata/platatheme/Magento_Checkout/web/template/minicart/content.html

After Change this Clear cache, and generate static content then check it.

Reference: http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/templates/template-sample.html