<p>Try merging like this</p>

<pre><code>{% set parent = craft.entries.section('pages').id(8) %}

{% set entries = craft.entries.section('pages').descendantOf(8).limit(1) %}

{% set entries = parent|merge(entries) %}

{% for entry in entries.all() %}
  output your entries here
{% endfor %}
</code></pre>

CC BY-SA 4.0
2019-03-25T13:23:23.457Z
Thanks Sean works a treat!
user2569
CC BY-SA 4.0
2019-03-25T13:21:33.240Z
2019-03-25T13:21:33.240Z
CreateSean
<p>I'm creating a footer menu and want to show an entry id and its children, atm I'm just getting the descendants but struggling to show the parent and children as well</p>

<pre><code>&lt;nav class="cell small-12"&gt;

    &lt;ul class="nested  menu vertical"&gt;

        {% set entries = craft.entries.section('pages').descendantOf(8) %}

        &lt;p&gt;{{ entry.parent }}&lt;/p&gt;

        {% nav entry in entries %}

        &lt;li&gt;&lt;a class="c-main-nav__li__a" href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;

            {% ifchildren %}
            &lt;ul class="menu vertical sub-items"&gt;
                {% children %}
            &lt;/ul&gt;
            {% endifchildren %}

        &lt;/li&gt;

        {% endnav %}

    &lt;/ul&gt;

&lt;/nav&gt;
</code></pre>

<p>Appreciate this is the wrong approach any feedback appreciated on how to display the title of id 8 as well as its children, atm parent.entry is not showing</p>

<entry><structure><parents>
How would you show a specific entry 'and' its children
# How would you show a specific entry 'and' its children

(Asked by: username_0 on 2019-03-25)

I'm creating a footer menu and want to show an entry id and its children, atm I'm just getting the descendants but struggling to show the parent and children as well


    

        {% set entries = craft.entries.section('pages').descendantOf(8) %}

        {{ entry.parent }}

        {% nav entry in entries %}

        {{ entry.title }}

            {% ifchildren %}
            
                {% children %}
            
            {% endifchildren %}

        

        {% endnav %}

    



Appreciate this is the wrong approach any feedback appreciated on how to display the title of id 8 as well as its children, atm parent.entry is not showing

**Tags:** entry, structure, parents


---

## 1 answers

### Answer by username_1 on 2019-03-25. Score: 1 | Accepted answer

Try merging like this
{% set parent = craft.entries.section('pages').id(8) %}

{% set entries = craft.entries.section('pages').descendantOf(8).limit(1) %}

{% set entries = parent|merge(entries) %}

{% for entry in entries.all() %}
  output your entries here
{% endfor %}

> **Comments:**
> **username_0**: Thanks Sean works a treat!  

---

