Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-25T13:23:23.457Z
Answers.Text: Thanks Sean works a treat!
Answers.UserDisplayName: user2569
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-25T13:21:33.240Z
Answers.LastActivityDate: 2019-03-25T13:21:33.240Z
Answers.UserDisplayName: CreateSean
Body: <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>
  
Tags: <entry><structure><parents>
Title: How would you show a specific entry 'and' its children
ThreadText: # 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
  
  ```
  <nav class="cell small-12">
  
      <ul class="nested  menu vertical">
  
          {% set entries = craft.entries.section('pages').descendantOf(8) %}
  
          <p>{{ entry.parent }}</p>
  
          {% nav entry in entries %}
  
          <li><a class="c-main-nav__li__a" href="{{ entry.url }}">{{ entry.title }}</a>
  
              {% ifchildren %}
              <ul class="menu vertical sub-items">
                  {% children %}
              </ul>
              {% endifchildren %}
  
          </li>
  
          {% endnav %}
  
      </ul>
  
  </nav>
  
  ```
  
  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!  
  
  ---
  
  