From bfb083a23b6ab670a2ec2e441b889c92eb75b482 Mon Sep 17 00:00:00 2001 From: Randi Mays Date: Thu, 12 Oct 2023 17:03:59 -0500 Subject: [PATCH] VACMS-10939 Add Reusable Q&As to Campaign Landing Pages --- .../campaign_landing_page.drupal.liquid | 13 ++++++- .../nodeCampaignLandingPage.graphql.js | 34 +++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/site/layouts/campaign_landing_page.drupal.liquid b/src/site/layouts/campaign_landing_page.drupal.liquid index 08b8446308..ef47bc7f24 100644 --- a/src/site/layouts/campaign_landing_page.drupal.liquid +++ b/src/site/layouts/campaign_landing_page.drupal.liquid @@ -458,7 +458,7 @@

FAQ

Frequently asked questions

- + {% for faqParagraph in fieldClpFaqParagraphs %} {% if faqParagraph.entity %} @@ -477,6 +477,17 @@ {% endif %} {% endfor %} + + + {% for reusableQA in fieldClpReusableQA %} + {% if reusableQA.entity.entityBundle == "q_a_group" %} + {% if reusableQA.entity.fieldAccordionDisplay %} + {% include "src/site/paragraphs/q_a_group_collapsible_content.drupal.liquid" with entity = reusableQA.entity %} + {% else %} + {% include "src/site/paragraphs/q_a_group_content.drupal.liquid" with entity = reusableQA.entity %} + {% endif %} + {% endif %} + {% endfor %} diff --git a/src/site/stages/build/drupal/graphql/nodeCampaignLandingPage.graphql.js b/src/site/stages/build/drupal/graphql/nodeCampaignLandingPage.graphql.js index 589bc3b530..e039fe41df 100644 --- a/src/site/stages/build/drupal/graphql/nodeCampaignLandingPage.graphql.js +++ b/src/site/stages/build/drupal/graphql/nodeCampaignLandingPage.graphql.js @@ -75,6 +75,40 @@ const nodeCampaignLandingPage = ` } } } + fieldClpReusableQA { + entity { + entityType + entityBundle + entityId + ... on ParagraphQAGroup { + fieldSectionHeader + fieldRichWysiwyg { + processed + } + fieldAccordionDisplay + queryFieldQAs { + entities { + entityId + entityLabel + entityBundle + ... on NodeQA { + fieldAnswer { + entity { + entityBundle + entityId + ... on ParagraphRichTextCharLimit1000 { + fieldWysiwyg { + processed + } + } + } + } + } + } + } + } + } + } fieldClpResources { entity { entityType