如何在 twig drupal 8 中循环段落列表(实体参考修订列表)

How to loop a paragraph list (entity reference revisions list) in twig drupal 8

如何循环段落列表并获取每个字段值?

我构建了一个包含其他段落的段落。 现在我需要遍历它们并获取它们的值以将它们列出到树枝模板中

假设段落结构有这个字段

  1. 标题
  2. 描述
  3. 段落:

    1. 标题
    2. 描述
    3. 开始日期
    4. 结束日期

我的field.html.twig文件看起来像

{% if label_hidden %}
  {% if multiple %}
    {% for item in items %}
      {{ item.content }}
    {% endfor %}
  {% else %}
    {% for item in items %}
      {{ item.content }}
    {% endfor %}
  {% endif %}
{% else %}
  <div{{ title_attributes }}>{{ label }}</div>
  {% if multiple %}
    {% endif %}
    {% for item in items %}
      {{ item.content }}
    {% endfor %}
    {% if multiple %}
  {% endif %}
{% endif %}

我的段落--name.html.twig看起来像

<div class="row">
  <div class="col-sm-8 col-md-offset-2">
    <div class="section-title">
      <h2>{{ content.field_skill_title }}</h2>
      <p>{{ content.field_skill_description }}</p>
    </div>
  </div>
</div>
<div class="row">
  <div class="col-sm-8 col-md-offset-2">
    {# HERE SHOULD GO THE LOOP WITH REST 3 PARAGRPAHS #}
  </div>
</div>

我的问题是我应该如何实现循环以将值显示到模板中?

<div class="row">
  <div class="col-sm-8 col-md-offset-2">
    <div class="section-title">
      <h2>{{ content.field_skill_title }}</h2>
      <p>{{ content.field_skill_description }}</p>
    </div>
  </div>
</div>
<div class="row">
  <div class="col-sm-8 col-md-offset-2">
    {# HERE SHOULD GO THE LOOP WITH REST 3 PARAGRPAHS #}
    {% for key, item in content.field_name_here if key|first != '#'%}
     {{ item['#paragraph'].field_title[0].value|raw }}
     {{ item['#paragraph'].field_description[0].value|raw }}
     {{ item['#paragraph'].field_start_date[0].value|raw }}
     {{ item['#paragraph'].field_end_date[0].value|raw }}
    {% endfor %}
  </div>
</div>