6

I am working on a Theme based on Magento 2's LUMA theme.

I know that the main luma theme files are stored in:

vendor/magento/theme-frontend-luma/

My problem is that I cannot file the template phtml files in there.

Where are they stored, so I can copy them into my theme?

9

The files that exist in the Luma theme are just override files for the files not included in the Base theme or the module specific files. To get the template files, go to the files in the vender/magento/{{module_name}} folders and grab what you are looking to work with and copy it over to a custom theme.

So lets say that you are looking to edit the product list template file (a common file to make edits to) you just need to copy the file

/vendor/magento/module-catalog/view/frontend/templates/product/list.phtml

to your theme

app/design/frontend/{{vendor_namespace}}/{{theme_name}}/Magento_Catalog/templates/product/list.phtml

If you do this with template hints turned on (stores-> configuration-> advanced-> developer-> debug) the product list (category) page, you should now see that the template is now coming from your theme and not from the vendor/magento folder.

3
  • Its not working for me. I tired to change the luma theme files. app/design/frontend/Magento/luma/Magento_Catalog/templates/list.phtml Kindly guide me. – VijayS91 Mar 22 '17 at 17:17
  • @circlesix thank you for the answer. Are you available on chat from time to time? you seem like you know your stuff and I need a mentor on this magneto thing. – Mohammed Joraid Feb 8 '18 at 13:51
  • @ MJoraid, i'm always happy to help, but stacks is not the best people to hit people up. I think we all need all the help we can get with Magento! I just did a write up on themes in Magento, check it out and you can contact me through the site if you have questions in the future. customerparadigm.com/magento-2-theming-basics – circlesix Feb 9 '18 at 16:27
1

@VijayS91

Try adding it like this:

app/design/frontend/{{vendor_namespace}}/{{theme_name}}/Magento_Catalog/templates/product/list.phtml

(just add the /product/ directory..worked for me)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.