Developing Magento 2 templates
Magento works with .phtml
template files to generate the view layer for the users. Files with the .phtml
extension contain both embedded HTML5 as well as PHP programming logic to render all page content using Magento processing. The modules and themes in Magento have their specific groups of .phtml
files to show data to the users.
In an order to strengthen these concepts, it's time to implement some template development on the BookStore theme project by following these instructions:
- Create the
Magento_Catalog
directory under theapp/design/frontend/Packt/bookstore
directory. - Copy the
vendor/magento/module_catalog/view/frontend/templates
directory toapp/design/frontend/Packt/bookstore/Magento_Catalog
. - Open the
app/design/frontend/Packt/bookstore/Magento_Catalog/templates/product/view/addto.phtml ...
Get Magento 2 Theme Design - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.