<div class="faqsList">


    {% for cat_id in [1,2,3,4] %}

        {% set cat_name = 'Category ' ~ cat_id %}

        {% if p.pagedata[cat_name][0]['Question']['value'] is not empty %}


            {% if p.pagedata[cat_name ~ ' Name'][0]['value'] is not empty %}
                <h2 class="faqTitles">
                    {{ p.pagedata[cat_name ~ ' Name'][0]['value'] }}
                </h2>
            {% endif %}

            {% set open_first = false %}

            {% if cat_id < 2 %}
                {% set open_first = true %}
            {% endif %}

            {% include 'includes/pages/faqs/faq.twig' with {
                faqs: p.pagedata[cat_name],
                open_first: open_first
            }%}


        {% endif %}

    {% endfor %}


</div> <!-- .faqContainer -->
