Skip to main content
edited tags
Link
nicael
  • 2.4k
  • 7
  • 28
  • 48
Source Link

Targeting entries in a structure

In a structure like the following:

Offices             US          Albuquerque
[offices]                       Boston
                                Chicago
                                Denver

                    Mexico      Acapulco
                                Buenavista
                                Chihuahua

                    Canada      Ajax
                                Brampton

writing this code on the offices overview page

{% for entry in craft.entries.section('offices') %}

<h2>{{ entry.title }}</h2>

{% endfor %}

gives me an output of everything in the whole structure

when writing:

{% for entry in craft.entries.section('offices').level(1) %}

<h2>{{ entry.title }}</h2>

{% endfor %}

I get the title from the entry in the first level.

But how do i target a specific entry in the structure? Let's say only Albuquerque, Chicago & Chihuahua?

I looked around but can't seem to find anything in the docs about that. Who can point me in the right direction?