0
我使用的是eco renderer
內Docpad
(構建基於https://github.com/zenorocha/browser-diet網站)無法使用的findAll()來搜索子目錄
在這裏面,我需要找到一個特定的子目錄中的所有文件。
目錄結構:
/src/documents/test1/test2
我需要找到存儲在test2
的文件我能找到的所有文件中test1
使用:
<% for item in @getCollection("documents").findAll({ url: $startsWith: '/test1'}, [order:-1]).toJSON(): %>
沒有文件當我添加一個額外的子目錄時被返回,使用:
<% for item in @getCollection("documents").findAll({ url: $startsWith: '/test1/test2'}, [order:-1]).toJSON(): %>
該URL有文檔,所以我做錯了什麼?