From 935c02ecedd320751141c89c46e09196a67a6fcc Mon Sep 17 00:00:00 2001
From: Eric Bremner <ebremner@uwaterloo.ca>
Date: Mon, 15 Nov 2021 16:45:35 +0000
Subject: [PATCH] ISTWCMS-5195: fixing title and url in title on card

---
 .../_patterns/04-components/card/card-elements/_header.twig  | 1 +
 .../_patterns/04-components/card/card-elements/_title.twig   | 5 +++--
 source/_patterns/04-components/card/card.twig                | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/source/_patterns/04-components/card/card-elements/_header.twig b/source/_patterns/04-components/card/card-elements/_header.twig
index f5fb6918..85ac6537 100644
--- a/source/_patterns/04-components/card/card-elements/_header.twig
+++ b/source/_patterns/04-components/card/card-elements/_header.twig
@@ -10,6 +10,7 @@
     {% include '@components/card/card-elements/_title.twig' with {
       'header_level': 2,
       'title': header.title,
+      'type': type
     } %}
   {% endif %}
 
diff --git a/source/_patterns/04-components/card/card-elements/_title.twig b/source/_patterns/04-components/card/card-elements/_title.twig
index 59160d13..dae73fdb 100644
--- a/source/_patterns/04-components/card/card-elements/_title.twig
+++ b/source/_patterns/04-components/card/card-elements/_title.twig
@@ -5,13 +5,14 @@
     <strong>
 {% endif %}
 
-{% if url %}
+
+{% if url and type != 'node' %}
   <a href="{{ url }}">
 {% endif %}
 
 {{ title }}
 
-{% if url %}
+{% if url and type != 'node' %}
   </a>
 {% endif %}
 
diff --git a/source/_patterns/04-components/card/card.twig b/source/_patterns/04-components/card/card.twig
index 0a5439e4..5b058e37 100644
--- a/source/_patterns/04-components/card/card.twig
+++ b/source/_patterns/04-components/card/card.twig
@@ -24,7 +24,8 @@
     {% if show_header == 'yes' %}
       {% include '@components/card/card-elements/_header.twig' with {
         'header': header,
-        'show_title': show_title
+        'show_title': show_title,
+        'type': type
       } %}
     {% endif %}
 
-- 
GitLab