diff --git a/src/site/layouts/support_resources_detail_page.drupal.liquid b/src/site/layouts/support_resources_detail_page.drupal.liquid index 48cef2b94f..813a56e18f 100644 --- a/src/site/layouts/support_resources_detail_page.drupal.liquid +++ b/src/site/layouts/support_resources_detail_page.drupal.liquid @@ -2,7 +2,10 @@ {% include "src/site/includes/preview-edit.drupal.liquid" %} {% include "src/site/includes/breadcrumbs.drupal.liquid" with constructLcBreadcrumbs = true titleInclude = true %} -
+
@@ -42,37 +45,16 @@ {% for block in fieldContentBlock %} - {% assign bundleComponent = "src/site/paragraphs/" | append: block.entity.entityBundle %} - {% assign bundleComponentWithExtension = bundleComponent | append: ".drupal.liquid" %} - {% include {{ bundleComponentWithExtension }} with entity = block.entity %} + {% if block.entity.entityBundle == "q_a_group" %} + {% include "src/site/paragraphs/q_a_group_content.drupal.liquid" with entity = block.entity %} + {% else %} + {% assign bundleComponent = "src/site/paragraphs/" | append: block.entity.entityBundle %} + {% assign bundleComponentWithExtension = bundleComponent | append: ".drupal.liquid" %} + {% include {{ bundleComponentWithExtension }} with entity = block.entity %} + {% endif %} {% endfor %} - - {% for contentBlock in fieldContentBlock %} - {% if contentBlock.entity.entityBundle === "q_a_group" %} - {% assign fieldQAs = contentBlock.entity.queryFieldQAs.entities %} - - {% if contentBlock.entity.fieldSectionHeader %} -

{{ contentBlock.entity.fieldSectionHeader }}

- {% endif %} - - {% assign fieldSectionHeaderTag = 'h2' %} - {% if contentBlock.entity.fieldSectionHeader %} - {% assign fieldSectionHeaderTag = 'h3' %} - {% endif %} - {% for fieldQA in fieldQAs %} - <{{ fieldSectionHeaderTag }}>{{ fieldQA.entityLabel }} - {% if fieldQA.fieldAnswer %} - {% assign fieldAnswer = fieldQA.fieldAnswer %} - {% assign bundleComponent = "src/site/paragraphs/" | append: fieldAnswer.entity.entityBundle %} - {% assign bundleComponentWithExtension = bundleComponent | append: ".drupal.liquid" %} - {% include {{ bundleComponentWithExtension }} with entity = fieldAnswer.entity %} - {% endif %} - - {% endfor %} - {% endif %} - {% endfor %} {% if fieldButtonsRepeat %} @@ -108,7 +90,7 @@
- + {% include "src/site/includes/above-footer-elements.drupal.liquid" %}
@@ -117,4 +99,4 @@
{% include "src/site/includes/footer.html" %} -{% include "src/site/includes/debug.drupal.liquid" %} +{% include "src/site/includes/debug.drupal.liquid" %} \ No newline at end of file diff --git a/src/site/paragraphs/q_a_group_content.drupal.liquid b/src/site/paragraphs/q_a_group_content.drupal.liquid new file mode 100644 index 0000000000..de242370d7 --- /dev/null +++ b/src/site/paragraphs/q_a_group_content.drupal.liquid @@ -0,0 +1,24 @@ +{% assign fieldQAs = entity.queryFieldQAs.entities %} + + + {% if entity.fieldSectionHeader %} +

{{ entity.fieldSectionHeader }}

+ {% endif %} + + {% assign fieldSectionHeaderTag = 'h2' %} + {% if entity.fieldSectionHeader %} + {% assign fieldSectionHeaderTag = 'h3' %} + {% endif %} + {% for fieldQA in fieldQAs %} + <{{ fieldSectionHeaderTag }}>{{ fieldQA.entityLabel }} + {% if fieldQA.fieldAnswer %} + {% assign fieldAnswer = fieldQA.fieldAnswer %} + {% assign bundleComponent = "src/site/paragraphs/" | append: fieldAnswer.entity.entityBundle %} + {% assign bundleComponentWithExtension = bundleComponent | append: ".drupal.liquid" %} + {% include {{ bundleComponentWithExtension }} with entity = fieldAnswer.entity %} + {% endif %} + + {% endfor %} + + + \ No newline at end of file