{% if hat.icon %} {% if "http" in hat.icon %} Иконка шляпы {{ hat.title }} {% else %} {{ hat.icon }} {% endif %} {% endif %} {{ hat.title }}