Answers.Body: <p>This is the corrected Twig code. I simply added <code>{{ entry.title }}</code> as an <code>&lt;li&gt;</code> item. This nav appears only on the page that I needed <code>entry.title</code> displaying.</p>
  
  <pre><code>{% set navList = (entry.level == 2) ? entry : entry.getAncestors().level(2).first()  %}
  
  {% if navList.hasDescendants %}
  
      &lt;ul&gt;
          {% set nav =  navList.getDescendants()  %}
          &lt;li&gt;{{ entry.title }}&lt;/li&gt;
          {% nav page in nav  %}
              {% if page.id != entry.id %}
                  &lt;li&gt;{{ page.getLink() }}&lt;/li&gt;
              {% else %}
                  &lt;li&gt;{{page}}&lt;/li&gt;
              {% endif %}
          {% ifchildren %}
              &lt;ul&gt;
                  {% children %}
              &lt;/ul&gt;
          {% endifchildren %}
          {% endnav %}
      &lt;/ul&gt;
  
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-03T08:55:47.877Z
Answers.LastActivityDate: 2017-10-03T23:32:57.650Z
Answers.LastEditDate: 2017-10-03T23:32:57.650Z
Answers.UserDisplayName: Steve Davies
Body: <p>I am trying to display a list of entries.  Specifically the parent entry and it's children's entry.</p>
  
  <p>I started off using this:</p>
  
  <pre><code>{% nav page in craft.entries.section('forms').isChildOf.slug('applicant-form') %}
  
      &lt;li&gt;
          {{ page.getLink() }}
  
          {% ifchildren %}
              &lt;ul&gt;{% children %}&lt;/ul&gt;
          {% endifchildren %}
      &lt;/li&gt;
  
  {% endnav %}
  </code></pre>
  
  <p>But this only displays the Parent.</p>
  
  <p>I found this solution on Stack here, and all the children display but not the parent.  I also wonder if this is the best solution to display the children as it seems a bit more lines than what is in the Craft docs.</p>
  
  <p>Many thanks.</p>
  
  <pre><code>{% set topLevel = (entry.level == 1) ? entry : entry.getAncestors().level(1).first()  %}
  
  {% if topLevel.hasDescendants %}
  
      &lt;ul&gt;
          {% set nav =  topLevel.getDescendants()  %}
  
          {% nav page in nav  %}
              {% if page.id != entry.id %}
                  &lt;li&gt;{{ page.getLink() }}&lt;/li&gt;
              {%else%}
                  &lt;li&gt;{{page}}&lt;/li&gt;
              {%endif%}
  
          {% ifchildren %}
              &lt;ul&gt;
                  {% children %}
              &lt;/ul&gt;
          {% endifchildren %}
  
          {% endnav %}
  
      &lt;/ul&gt;
  
  {% endif %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-02T14:26:52.577Z
Comments.Text: I think I have managed to fix this, to include the missing Parent I just add in the in  {{ entry.title }}
Comments.UserDisplayName: Steve Davies
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-02T18:06:32.330Z
Comments.Text: Would you mind adding what worked for you as an official answer? Might end up helping someone in the future! :)
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-03T08:56:23.507Z
Comments.Text: Hi @BradBell, that's done - had to wait to answer my own question.
Comments.UserDisplayName: Steve Davies
Tags: <children><parents><craft.entries>
Title: List both parent entry and its child entry
ThreadText: # List both parent entry and its child entry
  
  (Asked by: username_0 on 2017-10-02)
  
  I am trying to display a list of entries. Specifically the parent entry and it's children's entry.
  
  I started off using this:
  
  ```
  {% nav page in craft.entries.section('forms').isChildOf.slug('applicant-form') %}
  
      <li>
          {{ page.getLink() }}
  
          {% ifchildren %}
              <ul>{% children %}</ul>
          {% endifchildren %}
      </li>
  
  {% endnav %}
  
  ```
  
  But this only displays the Parent.
  
  I found this solution on Stack here, and all the children display but not the parent. I also wonder if this is the best solution to display the children as it seems a bit more lines than what is in the Craft docs.
  
  Many thanks.
  
  ```
  {% set topLevel = (entry.level == 1) ? entry : entry.getAncestors().level(1).first()  %}
  
  {% if topLevel.hasDescendants %}
  
      <ul>
          {% set nav =  topLevel.getDescendants()  %}
  
          {% nav page in nav  %}
              {% if page.id != entry.id %}
                  <li>{{ page.getLink() }}</li>
              {%else%}
                  <li>{{page}}</li>
              {%endif%}
  
          {% ifchildren %}
              <ul>
                  {% children %}
              </ul>
          {% endifchildren %}
  
          {% endnav %}
  
      </ul>
  
  {% endif %}
  
  ```
  
  **Tags:** children, parents, craft.entries
  
  > **Comments:**
  > **username_0**: I think I have managed to fix this, to include the missing Parent I just add in the in  {{ entry.title }}  
  > **username_1**: Would you mind adding what worked for you as an official answer? Might end up helping someone in the future! :)  
  > **username_0**: Hi @username_1, that's done - had to wait to answer my own question.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-10-03. Score: 1
  
  This is the corrected Twig code. I simply added `{{ entry.title }}` as an `<li>` item. This nav appears only on the page that I needed `entry.title` displaying.
  
  ```
  {% set navList = (entry.level == 2) ? entry : entry.getAncestors().level(2).first()  %}
  
  {% if navList.hasDescendants %}
  
      <ul>
          {% set nav =  navList.getDescendants()  %}
          <li>{{ entry.title }}</li>
          {% nav page in nav  %}
              {% if page.id != entry.id %}
                  <li>{{ page.getLink() }}</li>
              {% else %}
                  <li>{{page}}</li>
              {% endif %}
          {% ifchildren %}
              <ul>
                  {% children %}
              </ul>
          {% endifchildren %}
          {% endnav %}
      </ul>
  
  {% endif %}
  
  ```
  
  
  ---
  
  