{% load documents_tags %}

{% if object.category %}
    {% get_latest_documents category=object.category.slug as latest_documents %}
{% else %}
    {% get_latest_documents as latest_documents %}
{% endif %}

{% if latest_documents %}
    <div class="{{ css_classes }}">
        <ul>
            {% for document in latest_documents %}
                <li>
                    <a href="{{ document.get_absolute_url }}">{{ document.title }}</a>
                </li>
            {% endfor %}
        </ul>
    </div>
{% endif %}
