Check if timeline exists before displaying it
This commit is contained in:
parent
0d648729f7
commit
ad574ba89a
|
|
@ -1,12 +1,14 @@
|
|||
<ol class="timeline">
|
||||
{%- for elements in timeline -%}
|
||||
{% assign data = elements.data %}
|
||||
{% render 'partials/components/timeline-item',
|
||||
start: data.startDate,
|
||||
end: data.endDate,
|
||||
link: data.link,
|
||||
title: data.title,
|
||||
location: data.location,
|
||||
description: data.description %}
|
||||
{%- endfor -%}
|
||||
</ol>
|
||||
{% if timeline %}
|
||||
<ol class="timeline">
|
||||
{%- for elements in timeline -%}
|
||||
{% assign data = elements.data %}
|
||||
{% render 'partials/components/timeline-item',
|
||||
start: data.startDate,
|
||||
end: data.endDate,
|
||||
link: data.link,
|
||||
title: data.title,
|
||||
location: data.location,
|
||||
description: data.description %}
|
||||
{%- endfor -%}
|
||||
</ol>
|
||||
{% endif %}
|
||||
Loading…
Reference in a new issue