{% from "_macros/detail.html" import detail_header %} {% set endpoint = api('website', [pk]) %} {{ detail_header(url=endpoint, key=pk, content_type='website') }} {% defer (url=endpoint, as='website', key=pk) %} {# Apply transformer to get categories etc. working. #} {% set website = apps.transform(this) %}
{% if website.description %}

{{ _('Description') }}

{{ website.description|translate(website)|nl2br }}

{{ _('View All') }}
{% endif %}
{% if website.categories %}
{% set cat_link_format = '{name}' %} {% set categories = website.categories %} {% if categories.length == 2 %} {{ _('Explore more in {category_one} and {category_two}.')|format( category_one=cat_link_format|format(url=categories[0].url, name=categories[0].name), category_two=cat_link_format|format(url=categories[1].url, name=categories[1].name)) }} {% else %} {{ _('Explore more in {category}.')|format( category=cat_link_format|format(url=categories[0].url, name=categories[0].name)) }} {% endif %}
{% endif %}
{{ _('Is there something wrong or out-of-date with this website listing?') }}
{{ _('Report an issue') }}
{% except %} {% end %}