Merge a structure and a single section That is written so inefficently:

{% set indexNavi = craft.entries.section('pageContent').level(1).all() %}
{% set bookingLink = craft.entries.section('booking').all() %}

&lt;ul class="navList"&gt;
  {% for item in indexNavi %}
    &lt;li&gt;
      &lt;a class="btnLink" href="{{ item.url }}"&gt;{{ item.title }}&lt;/a&gt;
    &lt;/li&gt;
  {% endfor %}
  {% for item in bookingLink %}
    &lt;li&gt;
      &lt;a class="btnLink" href="{{ item.url }}"&gt;{{ item.title }}&lt;/a&gt;
    &lt;/li&gt;
  {% endfor %}
&lt;/ul&gt;


Is there a better way?

I wanted to creat a single variable:

{% set merger = craft.entries.section(['pageContent','booking']).level(1).all() %}


But this only outputs the pageContent. I guess because booking is a single section and therefore has no level?
But this only outputs the pageContent. I guess because booking is a single section and therefore has no level?


In short, yes. It's not super clean but you could fetch everything without worrying about level:

{% set merger = craft.entries.section(['pageContent','booking']).all() %}


Then check for level in your loop ('normal' entries return null as a level)

{% for item in merger %}
    {% if item.level is null or item.level == 1 %}
        {{ item.title }}&lt;br&gt;
    {% endif %}
{% endfor %}