{% fragment as default_content %} {% for td in data %} {% if forloop.first %} {{ td }} {% else %} {% #table_td %} {{ td }} {% /table_td %} {% endif %} {% endfor %} {% endfragment %} {{ children|default:default_content }}