Check if timeline exists before displaying it

This commit is contained in:
TheThomaas 2024-02-10 21:09:27 +01:00
parent 0d648729f7
commit ad574ba89a

View file

@ -1,12 +1,14 @@
<ol class="timeline"> {% if timeline %}
{%- for elements in timeline -%} <ol class="timeline">
{% assign data = elements.data %} {%- for elements in timeline -%}
{% render 'partials/components/timeline-item', {% assign data = elements.data %}
start: data.startDate, {% render 'partials/components/timeline-item',
end: data.endDate, start: data.startDate,
link: data.link, end: data.endDate,
title: data.title, link: data.link,
location: data.location, title: data.title,
description: data.description %} location: data.location,
{%- endfor -%} description: data.description %}
</ol> {%- endfor -%}
</ol>
{% endif %}