From 34905c7e1f47054b79c6a7648c025250fb4a9adc 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 | 36 +++++++++++++++++++ 2 files changed, 48 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..dc6962867d 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 @@ -318,6 +352,8 @@ const GetCampaignLandingPages = ` ${fragments.listOfLinkTeasers} ${fragments.linkTeaser} ${fragments.alert} + ${fragments.qa} + ${fragments.qaGroup} ${nodeEvent.fragmentWithoutBreadcrumbs} ${landingPageFragment} ${nodeCampaignLandingPage}