List both parent entry and its child entry 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') %}

    &lt;li&gt;
        {{ page.getLink() }}

        {% ifchildren %}
            &lt;ul&gt;{% children %}&lt;/ul&gt;
        {% endifchildren %}
    &lt;/li&gt;

{% 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 %}

    &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 %}
This is the corrected Twig code. I simply added {{ entry.title }} as an &lt;li&gt; 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 %}

    &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 %}