Retrieve Pages which have the current Page or Section as an Ancestor

Hello again :slight_smile:

I have been trying the following:

{{ $Pages := where .Site.Pages "IsDescendant" .CurrentSection }} 

However the following error appears in the console

... error calling where: IsDescendant is a method of type *hugolib.Page but doesn't satisfy requirements

I was wondering if there was a clean(er) way to achieve fetching Pages located at an unknown depth below the current page/section?

Another way I tried was using .Dir:

{{ $Pages := where .Site.Pages "Dir" ">" .CurrentSection.Dir }} 

But results were strange (too many results). Is there a “begins with” comparison operator? I have figured this out.

Thanks for your help :slight_smile: