How can I display second level children only from a specific parent structure item? I'm trying to display a list of child structure links, but only from a specific parent. The template I'm working on isn't for the parent in question so I don't think I can use 'entry.'

My structure is set up like this


Parent 1 
--Child One
--Child Two
--Child Three
Parent 2
--Child One
--Child Two


I only want to display the children of Parent 1. What I have so far is

&lt;ul id="sub-menu"&gt;
{% set pages = craft.entries.section('visit').level('&gt;1') %}
{% nav entry in pages %}
&lt;li&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;
    {% ifchildren %}
        &lt;ul&gt;
           {% children %}
        &lt;/ul&gt;
     {% endifchildren %}
&lt;/li&gt;
{% endnav %}
&lt;/ul&gt;


Using this outputs all of the second level children instead of just the children from Parent 1. Is there any way to specify that the only children I want to display must come from Parent 1? Can I specify a slug somehow?

Any help much appreciated
yes you can!

You may search for a slug craft.entries.slug('slug-of-first-parent'), select the first result .one(), and then the children by .getChildren(). Now you can proceed as you already did and limit your result to only elements with a level greater than 1 .level('&gt;1') and list.

{% set pages = craft.entries.slug('slug-of-first-parent').one().getChildren().level('&gt;1') %}


I am not sure whether this is the best and most effective solution, but it should definitely do the job.

Tip: You can display information about an entry and the methods and variables available by dumping them either by using var_dump($variable) in php code or {{ d($variable) }} (by using this free plugin) in your twig template. This can help a lot when dealing with entries and finding children or parents.