{% for item in tagged_items %}
{% ifchanged item.content_type.name %}
{% if not forloop.first %}{% endif %}
{{ item.content_type.name|title }}
{% endifchanged %}
{% if item.object %}
{% if item.object.status == False %} {# If an item doesn't have the status attribute, item.object.status would result None. That's why it is campared with False #}