Learn Drupal theming fundamentals

When you have completed this course, you will be ready to tackle any concept in Drupal theming, having attained a good foundation to build your knowledge. You'll also have a sandbox Drupal site to use to continue your theming journey.

  • How the Drupal theme layer relates to the rest of the system

  • How to override any of Drupal's HTML output

  • How to add both custom and third-party CSS and JavaScript libraries

  • How to discover which templates are being used on a page

  • Everything you need to know about Twig when working with Drupal templates

  • Tools for introspecting and debugging a theme

Course curriculum

To access free previews sign up for a free account

  • 2

    Get Set Up

    • Overview

    • Exercise: Set Up Demo Site for Theming Practice

  • 3

    Create a New Theme

    • Overview

    • Structure of a Theme

    • An Introduction to YAML

    • Describe Your Theme with an Info File

    • Regions

    • Add Regions to a Theme

      FREE PREVIEW
    • Theme Inheritance with Base Themes

    • Use a Base Theme

    • Drupal Base Themes: Classy and Stable

    • Download, Install, and Uninstall Themes

    • Exercise: Create a New Theme

  • 4

    Add an Asset Library

    • Overview

    • What Are Asset Libraries?

    • Define an Asset Library

    • Attach an Asset Library

    • Exercise: Add an Asset Library

  • 5

    Configure Your Environment for Theme Development

    • Overview

    • Configure Your Environment for Theme Development

    • Exercise: Configure Your Environment for Theme Development

  • 6

    Override the Main Page Template

    • Overview

    • What Are Template Files?

    • Override a Template File

    • Determine the Base Name of a Template

    • Discover Existing Theme Hook Suggestions

    • Exercise: Override the Main Page Template

  • 7

    Set Variables, Use Filters, and Add Classes in Templates

    • Overview

    • Twig in Drupal

    • Twig Syntax Delimiters

    • Arrays and Objects in Twig

    • Loops and Iterators in Twig

    • Print Values from a Field with a For Loop

    • Twig Filters and Functions

    • Make Your Theme Translatable

    • Classes and Attributes in Twig Templates

    • Routes, URLs, and Links in Twig Templates

    • Twig Template Inheritance

    • Exercise: Override the Node Template

    • Exercise: Override the Main Menu Template

    • Exercise: Override the Image Field Template

    • Exercise: Use the t Filter in a Template

  • 8

    Learn about Preprocess Functions

    • Overview

    • Add Logic with THEMENAME.theme

    • What Are Preprocess Functions?

    • Change Variables with Preprocess Functions

    • Add Variables to a Template File

    • Add New Theme Hook Suggestions

    • Exercise: Preprocess Functions

Frequently asked questions

  • Which versions of Drupal are covered?

    This course covers both Drupal 9 and 8.

  • How long does this course take to complete?

    The course material is designed to be completed with approximately 8 hours of work for reading and watching the materials and then completing the hands-on exercises. The time it takes each person will vary based on previous experience and how much work you put into your demo site.

  • What are the prerequisites?

    In order to dive into theming, you should already be familiar with setting up a basic Drupal site, including general configuration, and managing content types and users. You should also understand the fundamentals of HTML and CSS, and how a basic web page is put together. This course will be relevant for people who are new to Drupal theming as well as those looking to move from Drupal 7 to Drupal 8 or Drupal 9.

  • How do I get help?

    If you have trouble with the course material, you can always contact us at [email protected] and one of our trainers will help get you unstuck.

  • Do you have other courses?

    We currently only have this theming course for sale as an individual course. We have a full library of all Drupal topics available on our membership site, Drupalize.Me (https://drupalize.me/).

  • Does this include a membership to Drupalize.Me?

    No. This is totally separate from Drupalize.Me memberships. This is a one-time purchase where you have access to this individual course's materials and updates for as long as you like, with no need to renew a membership.

About us

Drupalize.Me is the top online Drupal training resource from Osio Labs - Open Source Inside and Out. We've been teaching Drupal for over 10 years through our membership site and are now making our popular online courses available for a one-time purchase instead of requiring a recurring subscription.

Osio Labs is on a mission to empower anyone to build websites using open source tools. We teach the technology and support the open source projects and communities that make it all possible.