Matrix Field - variable entry does not exist I'm trying to loop a Matrix field that has one block containing 3 items.

{% for block in entry.galeria.type('itemsGaleria') %}
    {% if block.titulo|length %}
        {{ block.titulo.first }}
    {% endif %}
{% endfor %}


But Craft always throws the error variable entry does not exist.

I read the Matrix section from Craft 3 docs but cannot fix this problem.

Any clues?
Thank you @Robin :) but I managed to do it myself.
It works nicely :)

{% set entries = craft.entries.section("galeria").all() %}

{% for entry in entries %}
    {% for block in entry.galeriaMatrix.all() %}
        {% switch block.type %}
            {% case "itemsGaleria" %}
                {% for image in block.fotografia %}
                    &lt;img src="{{image.url}}" alt="{{image.title}}" /&gt;
                {% endfor %}

                {{ block.titulo }}
                {{ block.texto }}
            {% default %}
        {% endswitch %}
    {% endfor %}
{% endfor %}