Twig Screencast

The template engine Twig will be a component of the Drupal 8 core and is replacing PHPTemplate. The new syntax brings a lot of changes and a simpler system. The function access is restricted, which results in a more secure system. The consistent use of the syntax improves the readability of template files extremely.

Motivation

I am going to show you the Basics of Twig in this short eight minute long screencast. You can see how to print variables or how to access objects or arrays via the punctual syntax. I will also demonstrate the use of control structures like if or for loops. After this video, you will be able to use Twig without the trouble of looking up the simple Twig syntax.

Further information

If that wasn't enough you can additionally read Steffen’s posts for the Twig basics [1] [2] or Luca’s about converting Drupal themes to Twig.

Since this is my first screencast, I would enjoy some constructive feedback.

 

Comments

penyaskito's picture
penyaskito

Thanks for sharing!

On a full-screen environment is readable, but I would love a bigger font size in future screencasts.

Add new comment