{# display a blog item which can be expanded/retracted by clicking on it if the locale differs from item language, it will be totally reduced, and will need a click to be displayed @variable item(data_object.BlogItem): item to display @variable identities(data_object.Identities): identities which can be used to display info on item author @variable dates_format(unicode): format of the date to use (see date_fmt filter) #} {% block item %} {% if item.language and locale and locale.language != item.language %} {# we may display items in different language in a specific way #} {% set other_lang = " other_lang" %} {% endif %}
{# following message is displayed if item lang is different from page locale #} {% if other_lang is defined %}

{% trans language=locale.language_name %}This message is not in {{language}}, click to display anyway{% endtrans %}

{% endif %} {# we put a reduce button at the top #}

{% trans %}Click to reduce…{% endtrans %}

{% block header %} {# title and publication date link to a HTTP page if items_http_uri is set #} {% set item_http_uri = items_http_uri.get(item.id) if items_http_uri is defined else none %}
{% block blog_title scoped %} {% set title = item.title_xhtml or item.title or '' %} {% if item_http_uri %} {{title}} {% else %} {{title}} {% endif %} {% endblock %}
{% block metadata scoped %} {% if item.tags %}
{% if tags_http_uri is defined %} {% for tag in item.tags %} {{tag}} {% endfor %} {% else %} {% for tag in item.tags %} {{tag}} {% endfor %} {% endif %}
{% endif %} {% endblock metadata %} {% endblock header %}
{% block content %} {{- item.content_xhtml or item.content|urlize or '' -}} {% endblock content %}
{# and the bottom button to expand/reduce the article #}

{% trans %}Click to expand…{% endtrans %} {% trans %}Click to reduce…{% endtrans %}

{% endblock item %}