Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Drupal 8 is upon us and with it comes the Twigification of all theme output. Anything that was a PHP template or theme function in Drupal 7 is now a Twig template so we all need to level up on our Twiggy knowledge—and I'm not talking about this Twiggy or this Twiggy.

Introduction

TODO

Syntax

Printing 

{{ someVar }}

Comments

Unknown macro: {# This is a comment, yo. #}


Control Structures

Unknown macro: {% if var %}

...

Unknown macro: {% endif %}
Unknown macro: {% for user in users if user.active %}

{{ user.name }} : {{ user.email }}

Unknown macro: {% else %}
Unknown macro: {# No active users #}
Unknown macro: {% endfor %}

Documentation

From the creators: 


Tutorials:


Dev Setup

  • No labels