Answer the question
In order to leave comments, you need to log in
How to pass variable value to child template?
field--node--field-1.html.twig template
{% set count = 0 %}
{% for item in items %}
{% set count = count + 1 %}
{{ item.content }}
{% endfor %}
{% if count == 1 %}
{% include 'themes/custom/my-theme/templates/content/taxonomy-term--name.html.twig' with {'count':count} %}
nothing comes out
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question