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
    Commented Sep 20, 2015 at 8:39
  • sorry I mean below in fact, all entries from levels 2 or 3 or 4...
    – migmaker
    Commented Sep 20, 2015 at 9:34

1 Answer 1

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 and acknowledge you have read our privacy policy.

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