Creating our first basic theme
Now that we have reviewed the basics of how a theme is constructed, there is no better time than the present to create our first basic theme. We will begin by creating a theme named twig
that we will use to work with exploring how Twig and the Theme system works in Drupal 8.
In order to make sure that we all are working from the same baseline, let's open up the Chapter03/start
folder located in the exercise files and select the drupal8.sql
database file. We will use this database snapshot to restore our current database instance. Refer to Chapter 1, Setting Up Our Development Environment for instructions on how to perform a database restore.
Now that we all have the same baseline Drupal instance, we can navigate to our Drupal 8 folder using MAC Finder or Windows Explorer and follow these next six steps to create a theme.
Step One – creating a new folder
Create a new folder under our themes
folder and call it twig
, as shown in the following image: