diff --git a/src/open_inwoner/components/templates/components/Card/CategoryCard.html b/src/open_inwoner/components/templates/components/Card/CategoryCard.html index 3d59183ce7..ed42ea404f 100644 --- a/src/open_inwoner/components/templates/components/Card/CategoryCard.html +++ b/src/open_inwoner/components/templates/components/Card/CategoryCard.html @@ -1,10 +1,33 @@ -{% load card_tags icon_tags link_tags helpers %} +{% load card_tags icon_tags link_tags helpers utils %} -{% render_card title=category href=category.get_absolute_url %} - {% for product in category.products.published %} - {% with category as parent %} - {% get_product_url product as product_url %} - {% link href=product_url icon='arrow_forward' icon_position='before' secondary=True text=product.name %} - {% endwith %} - {% endfor %} -{% endrender_card %} +{# create tag for anchor around card - never use anchors within anchors for valid HTML. #} +{% if category.products.published %} +
+ {{ category }} +
+ {% endif %} + {% for product in category.products.published %} + {% with category as parent %} ++ {{ category }} +
+ {% endif %} +- {% if href %} - {% link href=href text=title %} - {% else %} - {{ title }} - {% endif %} + {{ title }}
{% endif %} {{ contents }}