{% import "@macros/link.twig" as macrolink %} {% set author = item.get("content.author","") %} {% if not author|default %} {% set author = meta.email~' ('~meta.author~')' %} {% elseif '@' not in author %} {% set author = meta.email~' ('~author~')' %} {% endif %} {% set image = item.get("teaser.media.image") %} {% if image %} {% set thumb = image|imgSearchVariant(16/9) %} {% endif %} {# Converting with convert_encoding('UTF-8', 'HTML-ENTITIES') breaks the unlauts. https://stackoverflow.com/questions/53788141/php-convert-incorrect-umlauts-utf8 #} {% set htmlEntities = { ' ' : ' ', '<' : '', '>' : '', '&' : '&', '"' : '"', ''' : '\'', '¢' : '', '£': 'GBP', '¥' : 'YEN', '€' : 'EUR', '©' : '©', '®' : '®' }%} {% set title = item.get("teaser.title")|striptags|replace(htmlEntities) %} {% set categorie = item.get("meta.category")|striptags|replace(htmlEntities) %} {% set guid = item.get("teaser.url") %} {% set link = item.get("teaser.url") ~ macrolink.cleanQuery(meta.customQuery|default) %} {% set publishDate = item.get("control.publishDate")|date("r") %} {% set abstract = item.get("teaser.abstract")|striptags("")|replace(htmlEntities) %} {{ title }} {% endif %} {% if abstract|default %}{{ abstract }}{% endif %} ]]> {% if author|default %}{{ author }}{% endif %} {% if link|default %} {{ link|raw }} {{ guid|raw }} {% endif %} {% if publishDate|default %}{{ publishDate }}{% endif %} {% if thumb|default %}{% endif %} {% if categorie|default %}{{ categorie }}{% endif %}