<p>This is one part of a bigger switch case statement for a Craft Matrix field.</p>

<ul>
<li>My block is called <strong>newFeatureVideo</strong>.</li>
<li>my field is called <strong>video</strong>.</li>
</ul>

<pre><code>{% case "newFeatureVideo" %}
  {% for items in block.video.all() %}
    {% set item = craft.embeddedAssets.get(items) %}
    &lt;li&gt;&lt;a href="{{ item.url }}"&gt;{{ item.title }}&lt;/a&gt;&lt;/li&gt;
  {% endfor %}
</code></pre>

CC BY-SA 4.0
2019-09-18T01:00:50.877Z
2019-09-18T01:00:50.877Z
ChrisE
<p>I'm new to using craft cms and have been using this site to answer several questions. I decided I should give back. I have been using the Embedded Assets plugin but could not figure out the "for loop" code in a Matrix field to display links to all selected YouTube videos.</p>

CC BY-SA 4.0
2019-09-16T08:40:38.540Z
Is this a question or an answer?
Alex Roper
CC BY-SA 4.0
2019-09-17T22:16:25.467Z
Sorry, I should clarify. It looks like your code example above is correct. If you want to contribute an answer, can you move the answer to the field below and rephrase your question as someone else might ask (e.g. How do I...)? See [Can I answer my own question?](https://stackoverflow.com/help/self-answer)
Alex Roper
CC BY-SA 4.0
2019-09-18T01:01:35.777Z
Thank you. This is my first Question/Answer on StackOverflow.
ChrisE
<plugin-embeddedassets>
Get all craft.embeddedAssets
# Get all craft.embeddedAssets

(Asked by: username_0 on 2019-09-13)

I'm new to using craft cms and have been using this site to answer several questions. I decided I should give back. I have been using the Embedded Assets plugin but could not figure out the "for loop" code in a Matrix field to display links to all selected YouTube videos.

**Tags:** plugin-embeddedassets
> **Comments:**
> **username_1**: Is this a question or an answer?  
> **username_1**: Sorry, I should clarify. It looks like your code example above is correct. If you want to contribute an answer, can you move the answer to the field below and rephrase your question as someone else might ask (e.g. How do I...)? See [Can I answer my own question?](https://stackoverflow.com/help/self-answer)  
> **username_0**: Thank you. This is my first Question/Answer on StackOverflow.  

---

## 1 answers

### Answer by username_0 on 2019-09-18. Score: 2 | Accepted answer

This is one part of a bigger switch case statement for a Craft Matrix field.

My block is called newFeatureVideo.
my field is called video.

{% case "newFeatureVideo" %}
  {% for items in block.video.all() %}
    {% set item = craft.embeddedAssets.get(items) %}
    {{ item.title }}
  {% endfor %}


---

