{% extends "base.html" %}
{# Optionally renders an img element, otherwise standard value or link rendering #}
{% macro render_item_value(v, width) -%}
{% set val = v | string | trim %}
{% if val|length and val.lower().endswith(('.jpg', '.jpeg', '.png', '.gif', '.bmp')) %}
{# Ends with image extension: render img element with link to image #}
{% else %}
{# All other cases: text or link value #}
{{ v | urlize() }}
{% endif %}
{%- endmacro %}
{% block title %}{{ super() }} {{ data['title'] }} - {{ data['id'] }}{% endblock %}
{% block crumbs %}{{ super() }}
/ Collections
{% for link in data['links'] %}
{% if link.rel == 'collection' %}
/ {{ link['title'] }}
{% endif %}
{% endfor %}
/ Items
/ Item {{ data['id'] }}
{% endblock %}
{% block extrahead %}
{% endblock %}
{% block body %}
Item {{ data['id'] }}
{% if data['prev'] or data['next'] %}
{% for link in data['links'] %}
{% if link['rel'] == 'prev' %}
Previous
{% elif link['rel'] == 'next' %}
Next
{% endif %}
{% endfor %}