{% if SESSION.lang == 'es' %} {% set month = { '01':'Enero','02':'Febrero','03':'Marzo','04':'Abril','05':'Mayo','06':'Junio','07':'Julio','08':'Agosto','09':'Septiembre','10':'Octubre','11':'Noviembre','12':'Diciembre' } %} {% endif %} {% if SESSION.lang == 'en' %} {% set month = { '01':'January','02':'February','03':'March','04':'April','05':'May','06':'June','07':'July','08':'August','09':'September','10':'October','11':'November','12':'December' } %} {% endif %}
{{ trans('Volver al calendario') }}
{% if topicData | length %} {{ attribute(topicData[0], 'name_'~SESSION.lang) }} {% else %} {{ trans('Temas') }} {% endif %}
{{ trans('Próximos temas de') }} {{ attribute(topicData[0], 'name_'~SESSION.lang) }} {{ trans('en') }} {{ attribute(canalData[0], 'name_'~SESSION.lang) }}
{% set lastItemPublishDate = '' %} {% set counter = 0 %} {% set startloop = false %} {% for data in items %} {% for item in data %} {% if topicData[0].slug_es in item.categories and item.publish_at|date('Y-m') != lastItemPublishDate|date('Y-m') %} {% set hasContent = false %} {% if startloop %} {% endif %} {% set startloop = true %}

{{ month[item.publish_at | date('m')] }} {{ item.publish_at | date('Y') }}

{# obtengo todas las fechas de publicación para el mes en curso #} {% set publish_date = [] %} {% for datePublish in data if data | length > 1 and canalData[0].id == 185 %} {% set publish_date = publish_date | merge([{'id':'row'~datePublish.publish_at,'date':datePublish.publish_at}]) %} {% else %} {% set publish_date = item.publish_at %} {% endfor %} {{ render("mediakit","frontend","widgetCalendario",{'date':publish_date}) }} {% endif %} {% if 'imagen' not in item.categories %} {% set hasContent = true %} {% set counter = counter + 1 %} {% endif %} {% if 'imagen' in item.categories and hasContent %} {{ item.slug_en ? item.slug_en : item.slug }} {% endif %} {% if topicData[0].slug_es in item.categories %} {% set lastItemPublishDate = item.publish_at %} {% endif %} {% endfor %} {% endfor %} {% if counter == 0 %} {% for c in canales if canal == c.id %}

No hay temas de {{ topicData[0].name_es }} en {{ canalData[0].name_es }}

{% endfor %} {% endif %}

permalink: {{ SITE_URL | slice(0,-1) ~ url('media-kit-topic',{'canal':canalData[0].slug_es, 'topic':topic}) }}