I've been trying to render/print the data from my custom blocks using paragraphs via entity reference to my twig template. So far I've managed to test and successfully print the data to my twig using the code below
{% for item in node.field_sidebar_area %}
{{node.field_sidebar_area[loop.index0].entity.field_block_query.entity.body.value | raw }}
{% for item in node.field_sidebar_area[loop.index0].entity.field_block_query %}
{{ item.entity.body.value | raw }}
{% endfor %}
{% endfor %}
If I tried using only this code below in printing the values from my custom block, it doesn't work
{% for item in node.field_sidebar_area[loop.index0].entity.field_block_query %}
{{ item.entity.body.value | raw }}
{% endfor %}
I have to set this code first before adding the for loop
in order to fetch the data from the custom block
{{node.field_sidebar_area[loop.index0].entity.field_block_query.entity.body.value | raw }}
|raw
on a body field, see drupal.stackexchange.com/questions/238762/… – 4k4 Jun 19 '18 at 9:34