Book Image

Magento 2 Theme Design - Second Edition

By : Richard Carter
Book Image

Magento 2 Theme Design - Second Edition

By: Richard Carter

Overview of this book

Magento is the e-commerce software and platform trusted by the world’s leading brands. Using Magento’s powerful theming engine, you can control the look, content, and functionality, and easily launch a flexible e-commerce website. However, because of its powerful features, developing Magento themes is easier said than done. This book aims to leverage the enhancements to theme designing in Magento 2 to the fullest. It will show you how to gear up the performance of your e-commerce website. We begin by introducing Magento 2 and its features along with implementing a local development Magento environment. We then move on to discuss the concepts of the Magento theme structure such as templates, inheritance, customization, and override. Further on, we explore the Magento UI Library, which is a new feature available in Magento 2.0. We will create a new Magento 2.0 theme named MyCake Store using Magento Bootstrap from Maven E-commerce and also create print strategies for the Magento 2.0 theme. We will also create and customize a new theme proposal for the Magento admin panel. At the end, we will integrate Magento 2.0 to Twitter and integrate it with social bookmarking and finally deploy our new Magento 2.0 theme.
Table of Contents (18 chapters)
Magento 2 Theme Design - Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Magento 2 layout system


As seen in the previous chapter, the Magento 2 layout layer has a basic standard of positioning elements. If we think of a simple page that displays products in a given category, we have the following positioning vision:

You can see that each element's position has a specific role in rendering the layout. The controller specifies the rendering of each block according to their respective models and visualization layers:

The Magento 2 layout system, defined by XML files, is responsible for manipulating elements and the behavior of each block or page to be rendered by creating parameters to feed the system. It is correct that the layout files influence the behavior and performance of the View layer when the rendering happens.

The layout layer is divided into the following sections:

  • Page layout: This is responsible for declaring the general structure of the page, for example, a three-column layout. It operates mainly within the <body> element at the time of page...