Chapter 6. Creating a Magento 2 Theme

In this chapter, we will cover some basics on how to build your own theme based on the Magento 2 blank theme and add/change pages of built-in modules through layout XML through the following recipes:

  • Creating a new theme
  • Changing a layout XML of a Magento 2 module
  • Adding CSS/JS to pages
  • Using Grunt for CSS changes
  • Adding static blocks to pages through layout XML
  • Adding static blocks to pages through widgets
  • Using a dynamic serving theme based on the client browser
  • Creating theme-specific translations

Introduction

Theming is an important part of building your e-commerce website; making it easy for users to navigate and SEO-friendly will make sure that your conversion will be optimized.

In Magento 2, theming has changed in a big way; it's easier to optimize your theme with the more granular way of controlling what is outputted through the layout configurations.

In this chapter, we will see some basics on how to build your own theme extended from the Magento blank theme, which can also be used to extend any other theme you want to use as a starting point.

In order to understand the way theming is done, you should know how to work with Less, CSS, XML, and PHP.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.213.238