Skip to content

Commit

Permalink
FIX Don't render links that don't exist (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Dec 4, 2023
1 parent 436f45f commit 3c8edfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/SilverStripe/LinkField/Models/Link.ss
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<a href="$URL" <% if $OpenInNew %>target="_blank" rel="noopener noreferrer"<% end_if %>>$DisplayTitle</a>
<% if $exists %>
<a href="$URL" <% if $OpenInNew %>target="_blank" rel="noopener noreferrer"<% end_if %>>$DisplayTitle</a>
<% end_if %>

0 comments on commit 3c8edfd

Please sign in to comment.