I have been working on this for 2 days and I can't figure it out. I hope someone can help me.
I have a paragraph (dinamic_columns_grid)
that has an entity reference field to another paragraph (field_dinamic_column)
This nested paragraph has an entity reference field to a Media image field (field_image)
. All the paragraphs have more fields but this is the one that is giving me problems.
I created a twig template for the first paragraph (paragraph--dinamic-columns-grid.html.twig)
where I want to display the nested paragraph's fields individually. I know I could use {{ content.field_dinamic_column }}
to display all of the results, and it does work, including the image field, but that's now what I want. All the fields in the code below are displaying correctly except the image field (field_image)
. I have tried everything but I can't seem to make it work. Any help will be appreciate.
{% for key, item in content.field_dinamic_column %}
{{ item['#paragraph'].field_html_content.value|raw }} / text field.It works
{{ item['#paragraph'].field_hide.value|raw }} / select field. It Works
{{ item['#paragraph'].field_image }} / Media image field. It doesn't work
{% endfor %}
I like to be able to see the image or at the very least the url. Thanks.
.entity.field_image.entity.uri.value
to the media image field and use filerul(). See drupal.stackexchange.com/questions/251441/….entity.field_image.entity.uri.value
won't work. How would you implement it?