Print only the first *text* paragraph
This commit is contained in:
parent
183434e5ba
commit
29f7fce47f
1 changed files with 8 additions and 2 deletions
|
@ -34,11 +34,17 @@
|
|||
* - label_display: The display settings for the label.
|
||||
*
|
||||
* @see template_preprocess_field()
|
||||
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
|
||||
*/
|
||||
#}
|
||||
<description>
|
||||
{% for item in items %}
|
||||
{{ item.content|render|escape }}
|
||||
{% set one_and_done = false %}
|
||||
{% for item in items if not one_and_done %}
|
||||
{{ item.content['#paragraph'].type.0.entity.id }}
|
||||
{% if item.content['#paragraph'].type.0.entity.id == 'text' %}
|
||||
{% set one_and_done = true %}
|
||||
{{ item.content|render|escape }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{# the closing description tag is found in the RSS view template so that we can
|
||||
add a Read more link — we don't have the node information to make it here!
|
||||
|
|
Loading…
Reference in a new issue