1

I have create a custom theme. and I want to override searchlist file.

 vendor/magento/module-catalog-search/view/frontend/templates/searchlist.phtml

I move it in

public_html/app/design/frontend/themevendor/theme/Magento_CatalogSearch/

But its render output from vendor. I am new in magento2 so can you suggest me where am i wrong?

2 Answers2

2

Move your file to your custom theme

public_html/app/design/frontend/../../Magento_CatalogSearch/templates/searchlist.phtml

And not need to deploy your custom theme. only run below command

php bin/magento cache:flush
Rakesh Donga
  • 135
  • 11
S.P
  • 293
  • 1
  • 3
  • 11
1

in magento2 we can override the templates. for that we have to create directory structure like this:
app/design/frontend/custom_vendor/custom_theme/Magento_CatalogSearch/templates/searchlist.phtml
if you change in your overridden template file than you have to run three commands in order to get the proper output-

php bin/magento cache:clean  
php bin/magento cache:flush  
php bin/magento setup:static-content:deploy -f 
Naveen Jain
  • 1,042
  • 7
  • 26