From 1cf209d66fa6db5ac3424487a573bb7dd113abf6 Mon Sep 17 00:00:00 2001 From: Eli Selkin Date: Mon, 30 Sep 2024 09:08:27 -0700 Subject: [PATCH] VACMS 18501 - working correct title and custom event (#2286) --- ...ist_of_link_teasers_facility.drupal.liquid | 50 +++++++++++-------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/src/site/paragraphs/facilities/list_of_link_teasers_facility.drupal.liquid b/src/site/paragraphs/facilities/list_of_link_teasers_facility.drupal.liquid index ab78b222ca..84bdbd053a 100644 --- a/src/site/paragraphs/facilities/list_of_link_teasers_facility.drupal.liquid +++ b/src/site/paragraphs/facilities/list_of_link_teasers_facility.drupal.liquid @@ -1,38 +1,43 @@ {% comment %} - Example data: - { - "fieldTitle":"Related links", - "fieldVaParagraphs":[...] - } +Example data: +{ +"fieldTitle":"Related links", +"fieldVaParagraphs":[...] +} {% endcomment %} {% if paragraph != empty %} -
-

- {% if regionNickname != empty %} - Other services at {{ regionNickname }} - {% else %} - {{ paragraph.fieldTitle }} - {% endif %} + {% if regionNickname != empty %} + {% capture stringTitle %} + Other services at {{ regionNickname }} + {% endcapture %} + {% else %} + {% assign stringTitle = paragraph.fieldTitle %} + {% endif %} +
+

+ {{ stringTitle | strip }}

{% assign linkTeasers = paragraph.fieldVaParagraphs %} {% comment %} - Max number of links allowed = 8 + Max number of links allowed = 8 {% endcomment %} {% if linkTeasers.length > 8 %} {% assign linkTeasers = linkTeasers | sliceArray: 0, 8 %} {% endif %} - + {% comment %} - If there are less than or exactly 6 links, 3 items per column - If there are more than 6 links, 4 items per column + If there are less than or exactly 6 links, 3 items per column + If there are more than 6 links, 4 items per column {% endcomment %} {% if linkTeasers.length > 6 %} {% assign linkWrapperStartIndex = 5 %} {% assign linkWrapperEndIndex = 4 %} - {% else %} + {% else %} {% assign linkWrapperStartIndex = 4 %} {% assign linkWrapperEndIndex = 3 %} {% endif %} @@ -44,15 +49,16 @@ {% assign spacing = " vads-u-margin-bottom--2" %} {% endif %} - + text="{{ link.title }}"> {% endfor %}
-{% endif %} +{% endif %} \ No newline at end of file