From 3c8edfdc02846e43c3ae4b5d044bd4046e224679 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:11:43 +1300 Subject: [PATCH] FIX Don't render links that don't exist (#130) --- templates/SilverStripe/LinkField/Models/Link.ss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/SilverStripe/LinkField/Models/Link.ss b/templates/SilverStripe/LinkField/Models/Link.ss index ebfb3eed..3d3c455f 100644 --- a/templates/SilverStripe/LinkField/Models/Link.ss +++ b/templates/SilverStripe/LinkField/Models/Link.ss @@ -1 +1,3 @@ -target="_blank" rel="noopener noreferrer"<% end_if %>>$DisplayTitle +<% if $exists %> + target="_blank" rel="noopener noreferrer"<% end_if %>>$DisplayTitle +<% end_if %>