Answers.Body: <p>Nevermind, the problem is solved.</p>
  
  <p>I just need to loop over the categories.</p>
  
  <pre><code>{% extends "matrix/default" %}
  {% block blockContent %}
  &lt;div class="row"&gt;
      &lt;div class="col flexcntr"&gt;
          {% for merk in block.merkNaam %}
              {{ merk.title }}
          {% endfor %} #}
      &lt;/div&gt;  
  &lt;/div&gt;
  {% endblock %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-05T11:12:36.420Z
Answers.LastActivityDate: 2020-05-05T11:12:36.420Z
Answers.UserDisplayName: John Stevens
Body: <p>Me and categories, always giving trouble :)</p>
  
  <p>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.</p>
  
  <pre><code>{% extends "matrix/default" %}
   {% block blockContent %}
   &lt;div class="row"&gt;
    &lt;div class="col flexcntr"&gt;
      {% set merk = block.merkNaam %}
      {{ merk.title }}
    &lt;/div&gt;    
   &lt;/div&gt;
  {% endblock %}
  </code></pre>
  
  <p>The outcome is empty ...</p>
  
  <p>What do I miss?</p>
  
Tags: <craft3><matrix><categories><field><category>
Title: Matrix-field with a category-field to output category-title on single entry page
ThreadText: # Matrix-field with a category-field to output category-title on single entry page
  
  (Asked by: username_0 on 2020-05-05)
  
  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?
  
  **Tags:** craft3, matrix, categories, field, category
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-05-05. Score: 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 %}
  
  ```
  
  
  ---
  
  