Promos

{% set no_promos = namespace(promo=false) %} {% for i in range(1, 6) %} {% set image_value_key = 'about_promos_promo_%s_image' % i %} {% set headline_value_key = 'about_promos_promotion_%s_title' % i %} {% set content_value_key = 'about_promos_promotion_%s_description' % i %} {% set startdate_value_key = 'about_promos_promotion_%s_start_date' % i %} {% set enddate_value_key = 'about_promos_promotion_%s_end_date' % i %} {% set link_value_key = 'about_promos_promotion_%s_call_to_action' % i %} {% if site.custom_fields[headline_value_key] and site.custom_fields[enddate_value_key] %} {% if site.custom_fields[enddate_value_key]|to_date(format='%m/%d/%y')|is_today or site.custom_fields[enddate_value_key]|to_date(format='%m/%d/%y')|is_future %}
{% if site.custom_fields[image_value_key] %} {% else %} {% if language.startswith('fr') %} default-promo-img {% else %} default-promo-img {% endif %} {% endif %}

{{ site.custom_fields[headline_value_key] }}

{{ site.custom_fields[startdate_value_key] }} - {{ site.custom_fields[enddate_value_key] }}
{% if site.custom_fields[content_value_key] %}

{{ site.custom_fields[content_value_key] }}

{% endif %} {% translate %}Contact Us{% endtranslate %}

{% set no_promos.promo = True %} {% endif %} {% endif %} {% endfor %} {% if no_promos.promo == False %}

Check back for promotions.

{% endif %}