Cocktail: Category and Story Iteration

Driving yourself nuts trying to show a list of stories or categories? Have a drink.

(cocktail == recipe for liquid … get it? ;)

{% for category in current_site.story_categories %}
  {% if category.label == category_label && category.published_stories != empty %}
<div class='item {{ category_class }}'>
<h3>{{ category | link }}</h3>
<h6 class="tagline">{{ tagline }}</h6>
<ul class='list list-small'> {% for story in category.published_stories %}
<li>{{ story | link }}</li> {% endfor %}
</ul>
</div> {% endif %} {% endfor %}

Rate This Story

Register or log in to rate
Average rating:

Talk about Cocktail: Category and Story Iteration

Register or log in to comment