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 @@
{% set display_year = timeline_items[0].year %}
<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>
<span class="timeline-year">{{ item.year }}</span>
<ol>
{% endif %}
{% if item.month and style == 'month' %}
<li>
<span class="timeline-month">{{ item.month}}</span>
<span class="timeline-year">{{ years.year }}</span>
<ol>
{% endif %}
{% for entry in item.entries %}
<li class="timeline-info">
{% if entry.image %}
<img src="{{ entry.image }}" alt="" class="timeline-photo"/>
{% endif %}
<div class="timeline-headline"><strong>{{ entry.headline }}</strong></div>
<p>{{ entry.content }}</p>
</li>
{% endfor %}
{% if item.month and style == 'month' %}
{% endif %}
{% for months in years.month %}
{% if style == 'month' %}
<li>
<span class="timeline-month">{{ months.name}}</span>
<ol>
{% endif %}
{% for item in months.entries %}
<li class="timeline-info">
{% if item.image %}
<img src="{{ item.image }}" alt="" class="timeline-photo"/>
{% endif %}
<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>
</li>
{% endif %}
{% if item.year != display_year %}
</ol>
</li>
{% set display_year = item.year %}
{% set display_year = years.year %}
{% endif %}
{% endfor %}
</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