I have following scenario :
{% extends '::layout.html.twig' %}
{% block title "Some title" %}
{% if posts is empty %}
{% block head %}
{{ parent() }}
<meta name="robots" content="noindex, follow">
{% endblock head %}
{% endif %}
Expected result is that in header of page where aren't posts will appear meta tag. Actuall result is that meta tag appears in both types of page – with and without posts.
This “workaround” solve problem:
{% block head %}
{{ parent() }}
{% if posts is empty %}
<meta name="robots" content="noindex, follow">
{% endif %}
{% endblock head %}
Is this bug or just my misunderstanding?
I have following scenario :
Expected result is that in header of page where aren't posts will appear meta tag. Actuall result is that meta tag appears in both types of page – with and without posts.
This “workaround” solve problem:
Is this bug or just my misunderstanding?