{% if categories.all %}

Categories: {% for cat in categories.all %} {{ cat.title }}{% if not forloop.last %},{% endif %} {% endfor %}

{% endif %}