{% if subcategories %}
{% for subcategory in subcategories %}
{{ subcategory }}
{% endfor %}
{% else %}
{% for questiongroup in questions %}
{% if forloop.first %}
{% for qg_questions in questiongroup.questions %}
{% for question in qg_questions %}
{% for value in question.values %}
{{ value.0 }}
{% for questiongroup_sub in questions %}
{% if questiongroup_sub.conditional_question == value.1 %}
{% for qg_questions_sub in questiongroup_sub.questions %}
{% for question_sub in qg_questions_sub %}
{{ question_sub }}
{% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endif %}
{% if questiongroup.qg == 'app_qg_91' %}
{% for qg_questions in questiongroup.questions %}
{% for question in qg_questions %}
{{ question }}
{% endfor %}
{% endfor %}
{% elif questiongroup.qg == 'app_qg_104' %}
{% for qg_questions in questiongroup.questions %}