Skip to content

Commit

Permalink
VACMS-10939 Add Reusable Q&As to Campaign Landing Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
randimays committed Oct 17, 2023
1 parent 3f693d4 commit bfb083a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/site/layouts/campaign_landing_page.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
<p class="va-u-text-transform--uppercase vads-u-color--gray-medium vads-u-font-size--sm vads-u-margin-bottom--0">FAQ</p>
<h2 class="vads-u-margin-top--0">Frequently asked questions</h2>

<!-- Questions/Answers -->
<!-- Page-specific Questions/Answers -->
<va-accordion bordered>
{% for faqParagraph in fieldClpFaqParagraphs %}
{% if faqParagraph.entity %}
Expand All @@ -477,6 +477,17 @@
{% endif %}
{% endfor %}
</va-accordion>

<!-- Reusable QAs -->
{% 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 %}
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bfb083a

Please sign in to comment.