1

I have a paragraph type called News. In this paragraph type I have a text field (field_news_intro ) with a summary. How do I display the summary in a twig template?

content.field_news_intro.summary seemed logical, but it doesn't return anything.

My template is called paragraph--news.html.twig

<div class="copy larger">
  {{ content.field_news_intro.summary }}
</div>
<div class="copy">
  {{ content.field_news_intro }}
</div>
  • Thanks. One of the answers did help. {{ content.field_description['#items'][0].summary }} – MrFox Jul 17 at 19:52
0

you can get the summary with summary attribute in field level.

{{ content.YOUR_FIELD_NAME['#items'][0].summary }} 

in your case answer will be :

{{ content.field_description['#items'][0].summary }} 
| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.