Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Magento 2 Theme Design

You're reading from   Magento 2 Theme Design Create stunning and responsive Magento 2 themes for your business

Arrow left icon
Product type Paperback
Published in Oct 2016
Publisher Packt
ISBN-13 9781785888229
Length 288 pages
Edition 2nd Edition
Languages
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Richard Carter Richard Carter
Author Profile Icon Richard Carter
Richard Carter
Fernando J Miguel Fernando J Miguel
Author Profile Icon Fernando J Miguel
Fernando J Miguel
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Introduction to Magento 2 FREE CHAPTER 2. Exploring Magento Themes 3. Magento 2 Theme Layout 4. Magento UI Library 5. Creating a Responsive Magento 2 Theme 6. Magento 2 Styles Debugging 7. Magento UI Components 8. Magento Layout Development 9. Magento 2 JavaScript 10. Social Media in Magento 2 11. Theme Development Best Practices 12. Magento Theme Distribution

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:

  1. Create the Magento_Catalog directory under the app/design/frontend/Packt/bookstore directory.

  2. Copy the vendor/magento/module_catalog/view/frontend/templates directory to app/design/frontend/Packt/bookstore/Magento_Catalog.

  3. Open the app/design/frontend/Packt/bookstore/Magento_Catalog/templates/product/view/addto.phtml file in your favorite code editor.

  4. Go to line 17 and enter the following code: <div><h2>Buy in BookStore!!!</h2></div>

  5. Save the file.

  6. Delete the...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime