1

Me and categories, always giving trouble :)

On blogs, we are using a matrix field and in one of the matrix-types, I have a category field. This is to output the title of the category.

{% extends "matrix/default" %}
 {% block blockContent %}
 <div class="row">
  <div class="col flexcntr">
    {% set merk = block.merkNaam %}
    {{ merk.title }}
  </div>    
 </div>
{% endblock %}

The outcome is empty ...

What do I miss?

1

Nevermind, the problem is solved.

I just need to loop over the categories.

{% extends "matrix/default" %}
{% block blockContent %}
<div class="row">
    <div class="col flexcntr">
        {% for merk in block.merkNaam %}
            {{ merk.title }}
        {% endfor %} #}
    </div>  
</div>
{% endblock %}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.