Even if we make our best efforts to keep everything perfect, 500 errors do happen. So in order to handle all my this-code-should-not-be-reached tests gracefully, I have a custom made error page. Read More
Tag: twig
Twig Macros
Macros are to Twig what functions are to PHP. They help the developer reuse certain repeatable elements, and they give an additional clean and organized look to the final code. So here is a quick an easy Macro tutorial for Twig.
Aims of this tutorial :
- Create a simple twig macro
- Include it and use it in a template
- Create a second macro that makes use of the first one