Twig Templates in Craft

In this course you will get a comprehensive overview of working with Twig templates in Craft. The goal is to get over the hump of writing Twig code, dispel any myth that using Twig is difficult, and help you take the next step in using Craft.

Twig Templates in Craft is made up of the following videos:

1 Course Introduction We learn what the course is about and the topics covered. 04:59
2 Module One: Basics of Templates in Craft Learn how Craft stores templates, how template routing works, and get an introduction to the Twig syntax. 20:54
3 Module Two, Introduction We'll review the sample site and prepare for the rest of the course. 02:33
4 Module Two, Part 1: Overview of Twig Learn how Twig and Craft work together. Where's the line between the two? 08:36
5 Module Two, Part 2: Using Twig in Craft Let's jump in and start coding our sample project using Twig code and Craft data. We'll use the for-loop, variables, and conditionals. 20:54
6 Module Two, Part 3: Template Inheritance with extends Tag Using the extends tag, we learn one of three ways to share templates in Craft. Along the way, we'll using extends to extend our base layout, learn how to set and override blocks in Twig, and use the parent() function. 21:36
7 Module Two, Part 4 We cover the second and third methods for sharing templates: includes and embed. We'll walk through how to use each, including how to override parts of an embed using blocks. We also review some Craft-specific include tags for JavaScript and CSS. 08:58
8 Module Two, Part 5 A look at how Twig allows you to manipulate data using Filters. We'll look at some Twig- and Craft-specific filters. 07:33
9 Module Two, Part 6 We spend the bulk of this part creating a macro to generate a social link list. We also look at the Twig verbatim tag, which allows you to output unparsed template code. 15:03
10 Module Three, Introduction An overview of what we'll cover in Module 3. 01:26
11 Module Three, Part 1 We test out nested navigation using Craft's native nav tag. 08:41
12 Module Three, Part 2 Module Three, Part 2 14:07