Magento 2 - Location of Luma theme's Template Files in the Vendor Directory

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.

Tags:

Magento2