Skip to content
Snippets Groups Projects
Commit a49b5b78 authored by m26lebla's avatar m26lebla
Browse files

more twig logic for timeline

parent 0539362d
No related branches found
No related tags found
1 merge request!47ISTWCMS-4184 m26lebla theme timeline
...@@ -5,42 +5,41 @@ ...@@ -5,42 +5,41 @@
{% set display_year = timeline_items[0].year %} {% set display_year = timeline_items[0].year %}
<ol class="{{ modifier_classes }}"> <ol class="{{ modifier_classes }}">
{% for item in timeline_items %} {% for years in timeline_items %}
{% if loop.index == 1 or item.year != display_year %} {% if loop.index == 1 or loop.index == 2 or loop.index == 3 or years.year != display_year %}
<li> <li>
<span class="timeline-year">{{ item.year }}</span> <span class="timeline-year">{{ years.year }}</span>
<ol>
{% endif %}
{% if item.month and style == 'month' %}
<li>
<span class="timeline-month">{{ item.month}}</span>
<ol> <ol>
{% endif %} {% endif %}
{% for months in years.month %}
{% for entry in item.entries %} {% if style == 'month' %}
<li class="timeline-info"> <li>
{% if entry.image %} <span class="timeline-month">{{ months.name}}</span>
<img src="{{ entry.image }}" alt="" class="timeline-photo"/> <ol>
{% endif %} {% endif %}
<div class="timeline-headline"><strong>{{ entry.headline }}</strong></div>
<p>{{ entry.content }}</p> {% for item in months.entries %}
</li> <li class="timeline-info">
{% endfor %} {% if item.image %}
<img src="{{ item.image }}" alt="" class="timeline-photo"/>
{% endif %}
{% if item.month and style == 'month' %} <div class="timeline-headline"><strong>{{ item.headline }}</strong></div>
<p>{{ item.content }}</p>
</li>
{% endfor %}
{% if style == 'month' %}
</ol>
</li>
{% endif %}
{% endfor %}
{% if loop.index == 1 or loop.index == 2 or loop.index == 3 or years.year != display_year %}
</ol> </ol>
</li> </li>
{% endif %} {% set display_year = years.year %}
{% if item.year != display_year %}
</ol>
</li>
{% set display_year = item.year %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ol> </ol>
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment