HTML Templates With Twig

Supercharge your HTML with a powerful templating language. Variables, loops, conditionals.. Twig brings programming concepts to your HTML workflow!

Watch User Created Playlist (3)

This playlist is user created.

pro-course-rss-logo

PRO RSS Feed

Create reusable HTML components with the "include" tag in TwigJS

P

Make your HTML components dynamic with the "with" keyword in TwigJS

P

Generate multiple HTML components from an array with the "for loop" in TwigJS

P
html tutorial about Create reusable HTML components with the "include" tag in TwigJS

Create reusable HTML components with the "include" tag in TwigJS

1:09 html PRO

In this lesson, we take a repeating block of HTML and turn it into a dynamic, reusable TwigJS component. The "include" tag allows us to generate multiple instances of the component, each with their own custom content.

html tutorial about Make your HTML components dynamic with the "with" keyword in TwigJS

Make your HTML components dynamic with the "with" keyword in TwigJS

1:29 html PRO

In this lesson, we make TwigJS components output custom content via the "with" keyword of the "include" tag. We also set up fallback values to make our component work in a variety of scenarios.

html tutorial about Generate multiple HTML components from an array with the "for loop" in TwigJS

Generate multiple HTML components from an array with the "for loop" in TwigJS

1:19 html PRO

In this lesson, we transform a series of TwigJS "includes" into a clean "for loop". We store our content into an array and let the loop generate one HTML component for each entry.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?