If you need to get the level 2 children for a specific Structure entry, and you have that entry's EntryModel (i.e. you have an entry
variable which refers to the Structure entry), you can just use the EntryModel's children
property, appending level
to only pull children from the desired level:
{% set children = entry.children().level(2) %}
There's also a descendantOf
parameter which can be used in a craft.entries
query – obviously, this should be the Structure entry's ID (or the complete EntryModel, i.e. entry
):
{% set entries = craft.entries({
'section' : 'yourSectionHandle',
'level' : 2,
'descendantOf' : entry.id
}) %}
Also, if you want to pull entries at a certain level in a Structure section but not limit it to children of a certain entry, you can append the level
parameter to your basic craft.entries
query:
{% set entries = craft.entries.section('yourSectionHandle').level(2) %}
{% for entry in entries %}
...
{% endfor %}
Note that craft.entries
queries can also be typed out using object notation, if you prefer (I find the object notation more readable, especially if you have a lot of parameters):
{% set entries = craft.entries({
'section' : 'yourSectionHandle',
'level' : 2
}) %}