{% load wagtailcore_tags %} {% load wagtailroutablepage_tags %} {% if footer %} {# Post archives are in footer #} {% if value.archives.count > 0 %} {% endif %} {% if value.more_archives.count > 0 %} {% endif %} {% else %} {# else for footer #} {% if value.archives.count > 0 %} {% if 'group' in value.list_style %}
{% for date in value.archives %} {% if value.archive_period == 'day' %} {{ date|date:'j E, Y' }} {% elif value.archive_period == 'month' %} {{ date|date:'E, Y' }} {% else %} {{ date|date:'Y' }} {% endif %} {% endfor %} {% if value.more_archives.count > 0 %} {% endif %}
{% if value.more_archives.count > 0 %}
{% for date in value.more_archives %} {% if value.archive_period == 'day' %} {{ date|date:'j E, Y' }} {% elif value.archive_period == 'month' %} {{ date|date:'E, Y' }} {% else %} {{ date|date:'Y' }} {% endif %} {% endfor %}
{# endif for more_archives #} {% endif %} {% else %} {# else related to value.list_style #} <{% if 'number' in value.list_style %}ol{% else %}ul{% endif %} class="{{ value.list_style }}"> {% for date in value.archives %}
  • {% if value.archive_period == 'day' %} {{ date|date:'j E, Y' }} {% elif value.archive_period == 'month' %} {{ date|date:'E, Y' }} {% else %} {{ date|date:'Y' }} {% endif %}
  • {% endfor %} {% if value.more_archives.count > 0 %}
  • {% endif %} {% if value.more_archives.count > 0 %} <{% if 'number' in value.list_style %}ol{% else %}ul{% endif %} class="{{ value.list_style }}"> {% for date in value.archives %}
  • {% if value.archive_period == 'day' %} {{ date|date:'j E, Y' }} {% elif value.archive_period == 'month' %} {{ date|date:'E, Y' }} {% else %} {{ date|date:'Y' }} {% endif %}
  • {% endfor %} {# endif for more_archives #} {% endif %} {# endif for list_style #} {% endif %} {# endif for archives.count #} {% endif %} {# endif for footer #} {% endif %}