Answers.Body: <p>Well, many tries later, I found a way to do it.</p>
  
  <pre><code>{% for block in currentUser.certificado %}
  &lt;div&gt;
      &lt;h3&gt;{{ block.nomeDoCertificado }}&lt;/h3&gt;
      &lt;h3&gt;{{ block.curso[0] }}&lt;/h3&gt;
      &lt;a href="{{ block.certificado[0].url }}" target="_blank"&gt;{{ block.nomeDoCertificado }}&lt;/a&gt;
  &lt;/div&gt;
  {% endfor %}
  </code></pre>
  
  <p>It is as simple as that :)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-17T10:56:12.850Z
Answers.LastActivityDate: 2019-04-22T22:42:26.327Z
Answers.LastEditDate: 2019-04-22T22:42:26.327Z
Answers.UserDisplayName: André Castro
Body: <p>I have a Matrix field named -> <code>certificado</code></p>
  
  <p>with block -> <code>certificados</code></p>
  
  <p>and fields -> <code>nomeDoCurso</code>, <code>curso</code>, <code>certificado</code></p>
  
  <p>My Matrix block has no entries but is associated with a user.</p>
  
  <p><a href="https://i.sstatic.net/IVJUy.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IVJUy.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.sstatic.net/5rRXd.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/5rRXd.png" alt="enter image description here"></a></p>
  
  <p>How can I fetch the content of the Matrix block for a particular user in the frontend?</p>
  
  <p>I'm trying with:</p>
  
  <pre><code>{% for item in currentUser.certificado %}
      {{ dump(item) }}
  {% endfor %}
  </code></pre>
  
  <p>But this is wrong.</p>
  
  <p>How can I do it?</p>
  
Tags: <craft3><matrix><loop><current-user>
Title: Craft 3 - Matrix Block for currentUser
ThreadText: # Craft 3 - Matrix Block for currentUser
  
  (Asked by: username_0 on 2019-04-17)
  
  I have a Matrix field named -> `certificado`
  
  with block -> `certificados`
  
  and fields -> `nomeDoCurso`, `curso`, `certificado`
  
  My Matrix block has no entries but is associated with a user.
  
  [![enter image description here](https://i.sstatic.net/IVJUy.png)](https://i.sstatic.net/IVJUy.png)
  
  [![enter image description here](https://i.sstatic.net/5rRXd.png)](https://i.sstatic.net/5rRXd.png)
  
  How can I fetch the content of the Matrix block for a particular user in the frontend?
  
  I'm trying with:
  
  ```
  {% for item in currentUser.certificado %}
      {{ dump(item) }}
  {% endfor %}
  
  ```
  
  But this is wrong.
  
  How can I do it?
  
  **Tags:** craft3, matrix, loop, current-user
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-04-17. Score: 1
  
  Well, many tries later, I found a way to do it.
  
  ```
  {% for block in currentUser.certificado %}
  <div>
      <h3>{{ block.nomeDoCertificado }}</h3>
      <h3>{{ block.curso[0] }}</h3>
      <a href="{{ block.certificado[0].url }}" target="_blank">{{ block.nomeDoCertificado }}</a>
  </div>
  {% endfor %}
  
  ```
  
  It is as simple as that :)
  
  
  ---
  
  