Week 5: Override the Main Page Template

This is Week 5 of the 7-week course Hands-On: Theming. Get started with Drupal 8 theming in 1 hour a week for 7 weeks. Based on our popular Drupal 8 Theming Workshop featured at DrupalCon.

Time to complete: About 1 hour

This week you will learn about the concept of template files and override the main page template. Go through each tutorial and then apply what you've learned in the final hands-on exercise. Be sure to complete the last tutorial listed (Exercise: Override the Main Page Template) before you move on to Week 6: Set Variables, Use Filters, and Add Classes in Templates.

Goal

  1. Understand the concept of template files in Drupal
  2. Complete Exercise: Override the Main Page Template:
    • Override the default page template file in order to change structural markup for your theme
    • Add new markup and CSS classes to Drupal's default markup

Follow along