5

I have a structure section with 3 levels.
I d like to list all entries below 1st level.
I see ancestorDist or descendantDist but I m not sure it is what I need...
https://craftcms.com/docs/templating/craft.entries

I see I can select multiple levels:
{% set entries = craft.entries.section('library').limit(10).level(2,3) %}
but I d like something like:
{% set entries = craft.entries.section('library').limit(10).level(>1) %}

2
  • What do you mean by above first level? level one is the top level. There is nothing above it.
    – KSPR
    Sep 20 '15 at 8:39
  • sorry I mean below in fact, all entries from levels 2 or 3 or 4...
    – migswd
    Sep 20 '15 at 9:34
9

Alright. you can just exclude the top level entries with not:

{% set entries = craft.entries.section('library').level('not 1') %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.