Override vendor/magento/module-customer PHTML file
-
27-12-2020 - |
Question
Magento 2.2.
I have a theme:
/app/design/frontend/Companyname/Newtheme/
I would like to override this PHTML file:
/vendor/magento/module-customer/view/frontend/templates/account/authentication-popup.phtml
What is the correct directory structure in my theme's folder to put my new file?
I have tried:
/app/design/frontend/Companyname/Newtheme/Magento_Customer/view/frontend/templates/account/authentication-popup.phtml
and
/app/design/frontend/Companyname/Newtheme/Magento_Theme/view/frontend/templates/account/authentication-popup.phtml
and
/app/design/frontend/Companyname/Newtheme/Magento_Theme/templates/account/authentication-popup.phtml
p.s. I know this is a really basic question, I am just not understanding the documentation and many examples online. Not sure why.
La solution
Correct Folder path.. You have mention 2 times frontend
...
app/design/frontend/Companyname/Newtheme/Magento_Customer/templates/account/authentication-popup.phtml
Don't forget to run
setup:static-content:deploy
cache:flush
Autres conseils
It must be.
/app/design/frontend/Companyname/Newtheme/Magento_Customer/templates/account/authentication-popup.phtml
No need to add view/frontend to your custom theme.
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange