The last of the three handler templates is one for all Matrix fields in the site.
The matrix template is special handler. Unlike the other two we already discussed, it doesn’t handle general layouts. Instead, it is the generic template for all Matrix fields on the site.
The code in the Matrix template is a simple for-loop that loops over each block in the Matrix field and includes a template to format and render the content that that Matrix field returns.
{% for block in matrix %}
{% include ["matrix/" ~ block.type, "matrix/default"] %}
{% endfor %}
Like we did in earlier templates, we’re leaning on Twig’s include statement and feeding it a list of template possibilities.

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.