Loop through structure entry types and matrix blocks Single page website. Navigation based on a Structure section (anchor links). Entries depend on entryTypes.

{# set each section ID with for anchor navigation #}
{% for page in craft.entries.section('pages') %}
&lt;section id ="{{ page.slug }}"&gt;

    {# check the slug to get the Matrix entries related to the (html) section ID #}
    {% if page.slug == 'home' %}
        {# get the entries for the entry.type #}
        {% set entries = craft.entries.type('pagesHome') %}
            {# loop through the block types and entries #}
            {% for block in page.matrixFieldHandle.type('matrixBlockHandle') %}
                {{ block.title }}
            {% endfor %}
    {% endif %}

    {# and so on.... #}
    {% if page.slug == 'about' %}
        ......
    {% endif %}

&lt;/section&gt;
{% endfor %}


Questions: am I setting up this single page website in a too complicated way with too many DB queries? 
Thanks for suggestions!
If I was building a single page website I might create a matrix field with different blocks for each "page".

{# Navigation #}
{% for block in entry.contentBlock %}
   &lt;li&gt;&lt;a href="#{{ block.slug }}"&gt;{{ block.title }}&lt;/a&gt;&lt;/li&gt;
{% endfor %}

{# Content #}
{% for block in entry.contentBlock %}
   &lt;section id="{{ block.slug }}"&gt;
     {{ block.body }}
   &lt;/section&gt;
{% endfor %}


This will allow someone to re-order "pages" easily under one entry. You can also create several different block types with different fields in if these "pages" needed to be different.