
{% load wagtailcore_tags wagtailimages_tags i18n %}

{% if articles %}
<div class="articles nav">
  <h2 class="list-header">{% trans "Recommended" %}</h2>
  {% for article in articles %}
  <ul class="list-block">
    <li>
      {% if article.image %}
      <a href="{% pageurl article %}">{% image article.image width-60 %}</a>
      {% endif %}
      <h3><a href="{% pageurl article %}">{{article.title}}</a></h3>
      <p>{{article.subtitle}}</p>
    </li>
  </ul>
  {% endfor %}
</div>
{% endif %}



{% load wagtailcore_tags wagtailimages_tags i18n %}

{% if articles %}
<div class="articles nav">
  <h2 class="list-header">{% trans "Recommended" %}</h2>
  {% for article in articles %}
  {# The 3rd ancestor is the section: [root, main, language, section, ...] #}
  <ul class="list-block {{article.get_ancestors.3.slug}}">
    <li>
      {% if article.image %}
      <a href="{% pageurl article %}">{% image article.image width-60 %}</a>
      {% endif %}
      <h3><a href="{% pageurl article %}">{{article.title}}</a></h3>
      <p>{{article.subtitle}}</p>
    </li>
  </ul>
  {% endfor %}
</div>
{% endif %}


Add section slug to article class for coloured lines
Add section slug to article class for coloured lines
