Twig Macros in Craft CMS

A full introduction to using macros in Twig. Learn how to build a macro, organize macros, pass data into a macro, and more.

Start Course
Ryan Irelan

I am the creator of CraftQuest, a web developer, and former software team manager. I spend most of my time improving CraftQuest with code and courses. When I'm not in front of the computer, I spend my time with my family, and running on the roads and trails of Austin, TX.

Twig Macros in Craft CMS is made up of the following videos:

1Getting Started with Twig MacrosHow to build a basic Twig macro with arguments and defaults. 11:46
2Passing Data into Twig MacrosHow to pass hashes, arrays, _context variable and more into a Twig macro. 16:12