diff --git a/hypha/templates/includes/relatedcontent_card.html b/hypha/templates/includes/relatedcontent_card.html index ed296408d587cc9fe00874f69d914faa427c31d0..04f82807111abc5ad83f4f197ae2f88d1b64d937 100644 --- a/hypha/templates/includes/relatedcontent_card.html +++ b/hypha/templates/includes/relatedcontent_card.html @@ -1,6 +1,7 @@ {% load i18n wagtailcore_tags wagtailimages_tags %} {% with page=page.specific %} +{% if page %} <a class="card" href="{% pageurl page %}"> <h6 class="card__subheading"> {% if page.is_open %} @@ -21,4 +22,5 @@ {% endif %} <svg class="icon icon--card-pixels"><use xlink:href="#arrow-head-pixels--transparent"></use></svg> </a> +{% endif %} {% endwith %}