{% trans_default_domain 'front_default' %} {% set titleForce = 3 %} {% set hasCustomLayout = entity.customLayout is defined and entity.customLayout %} {% set layout = entity.layout %} {% set i18n = not entity.customLayout ? entity|i18n : layout|layoutBlockType('text')|i18n %} {% if i18n or hasCustomLayout %} {% set title = hasCustomLayout ? layout|mainLayoutTitle : i18n.title %} {% set subTitle = i18n.subTitle is defined and i18n.subTitle ? i18n.subTitle : null %} {% set titleAlignment = i18n.titleAlignment is defined and i18n.titleAlignment ? i18n.titleAlignment : 'text-left' %} {% set intro = i18n.intro is defined and i18n.intro ? i18n.intro : null %} {% set introAlignment = i18n.introductionAlignment is defined and i18n.introductionAlignment ? i18n.introductionAlignment : 'text-left' %} {% set body = i18n.body is defined and i18n.body ? i18n.body : null %} {% set bodyAlignment = i18n.bodyAlignment is defined and i18n.bodyAlignment ? i18n.bodyAlignment : 'text-left' %} {% set mediaRelation = hasCustomLayout ? layout|layoutBlockType('media')|mainMedia : entity|mainMedia %} {% set haveMedia = mediaRelation.media.filename is defined and mediaRelation.media.filename %} {% set mediaConfig = mediaRelation|thumbConfiguration(thumbConfiguration, true) %} {% if url.code %}
{% include 'core/webmaster-edit.html.twig' with { 'title': "Éditer l'actualité"|trans([], 'front_webmaster'), 'role': 'ROLE_NEWSCAST', 'path': path('admin_newscast_edit', {'website': website.id, 'newscast': entity.id}) } only %} {% if haveMedia and displayThumbnail %} {{ mediaRelation|thumb(mediaConfig, {'colSize': 4}) }} {% endif %}
{% if title|striptags|length > 0 %} {{ title|unescape|raw }} {% endif %} {% if subTitle|striptags|length > 0 %} {{ subTitle|raw }} {% endif %} {% if hasListing and not hideDate or not hasListing and not entity.category.hideDate %} {% set format = formatDate ? formatDate : entity.category.formatDate %} {{ "Publié le"|trans }} {{ entity.publicationStart|localizeddate('none', 'none', app.request.locale, null, format) }} {% endif %} {% if hasListing and displayCategory or not hasListing and entity.category.displayCategory %} {% set i18nCategory = entity.category|i18n %} {% if i18nCategory and i18nCategory.title %} {% set titleCategory = i18n.title %} {{ i18nCategory.title|unescape|raw }} {% endif %} {% endif %} {% if intro|striptags|length > 0 %}

{{ intro|striptags|truncate(150) }}

{% endif %} {% if intro|striptags|length == 0 and body|striptags|length > 0 %}

{{ body|striptags|truncate(150) }}

{% endif %}
{% endif %} {% endif %}