{% load i18n %}
{% block cell-content %}
{% if not card_not_found %}
{% block cell-header %}
{% if title %}
{{ title|force_escape }}
{% endif %}
{% include "combo/asset_picture_fragment.html" %}
{% endblock %}
{% if card.id %}
{% spaceless %}
{% if cell.custom_schema %}
{% if cell.custom_schema.cells %}
{% with cell.get_custom_schema as custom_schema %}
{% for item in custom_schema.cells %}
{% if item.varname == "@custom@" %}
{% if item.template %}
{% with card.custom_fields|get:item.template|force_escape as value %}
{% if item.display_mode == "title" %}
{{ value }}
{% elif item.display_mode == "subtitle" %}
{{ value }}
{% elif item.display_mode == "label" %}
{{ value }}
{% elif item.display_mode == "text" %}
{{ value }}
{% endif %}
{% endwith %}
{% endif %}
{% elif item.varname == "@link@" %}
{% firstof item.link_field item.page item.url_template as link %}
{% if item.template and link %}
{% with card.custom_fields|get:item.template|force_escape as link_label %}
{% if link_label %}
{% if item.link_field %}
{% with fields_by_varnames|get:item.link_field as field and card.fields|get:item.link_field as value %}
{% if field and value and field.type == 'file' %}
{% endif %}
{% endwith %}
{% else %}
{% with item.page|default:item.url_template as url_key %}
{% with card.urls|get:url_key|force_escape as link_url %}
{% if link_url %}
{% else %}
{% if item.varname %}
{% with fields_by_varnames|get:item.varname as field %}
{% if field %}
{% with card.fields|get:item.varname as value %}
{% if value or item.empty_value != '@skip@' %}
{% if item.display_mode == "title" %}
{% include "combo/wcs/card-field-as-title.html" with title_tag="h3" %}
{% elif item.display_mode == "subtitle" %}
{% include "combo/wcs/card-field-as-title.html" with title_tag="h4" %}
{% elif item.display_mode == "text" %}
{% if value or item.empty_value == '@empty@' %}
{% include "combo/wcs/card-field-as-text.html" %}
{% else %}
{% with item.empty_value as value %}
{% include "combo/wcs/card-field-as-text.html" with empty=True %}
{% endwith %}
{% endif %}
{% endif %}
{% for field in schema.fields %}
{% if 'varname' in field and field.varname and field.type != 'page' %}
{% with card.fields|get:field.varname as value %}