I'm using an eco renderer
within Docpad
(building a site based on https://github.com/zenorocha/browser-diet)
In it, I need to find all the documents in a particular sub-directory.
The directory structure is:
/src/documents/test1/test2
I need to find the documents stored in test2
I can find all the documents in test1
using:
<% for item in @getCollection("documents").findAll({ url: $startsWith: '/test1'}, [order:-1]).toJSON(): %>
No documents are returned when I add an extra sub-directory, using:
<% for item in @getCollection("documents").findAll({ url: $startsWith: '/test1/test2'}, [order:-1]).toJSON(): %>
There are documents at that URL, so what am I doing wrong?