Template Tags

Template tags for displaying stories and related content.

Story Tags

Category Tags

Archive Tags

Utility Tags

URL Tags

Filters

Usage Examples

Basic story listing:

{% load stories_tags %}

{% get_recent_posts 5 as recent_posts %}
{% for post in recent_posts %}
    <h3><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></h3>
    <p>{{ post.abstract }}</p>
{% endfor %}

Category navigation:

{% load stories_tags %}

{% get_categories as categories %}
<ul class="category-menu">
{% for category in categories %}
    <li><a href="{{ category.get_absolute_url }}">{{ category.name }}</a></li>
{% endfor %}
</ul>

Related posts:

{% load stories_tags %}

{% get_related_posts post as related %}
{% if related %}
    <h4>Related Stories</h4>
    {% for related_post in related %}
        <a href="{{ related_post.get_absolute_url }}">{{ related_post.title }}</a>
    {% endfor %}
{% endif %}