Grav CMS

Add template identifiers in Grav

You can add template id’s to debug your Grav website. Check that:

{% extends 'partials/base.html.twig' %}

{% block body %}
    {% for module in page.collection() %}
        <!-- @begin_template: {{ module.template }} -->
        {{ module.content|raw }}
        <!-- @end_template: {{ module.template }} -->
    {% endfor %}
{% endblock %}

Will output:

Published by

Konrad Fedorczyk

Konrad Fedorczyk

I'm interested in programming and gamedev. I especially luv HTML5 and everything connected to web technologies.

Leave a Reply

Your email address will not be published. Required fields are marked *