I want to be able to list all items in the same folder as the list. I thought this would be easy to do using a JCR query but it doesn’t return any results.
My query is
select rx:sys_contentid, rx:sys_folderid, jcr:path, rx:sys_contentstartdate from rx:spctGeneralPage where rx:sys_folderid = 320
It seems that I can’t use the rx:sys_folderid in the where clause. Is there another way of doing this?
should return the path of the current item. Put this in a binding variable and use the binding variable in your JCR Query.
I believe that there is an example of this in the 6.5 developers training course, so if you have the training manual you should be able to find a worked example.
other patterns using % will work, and you can have several such clauses to select from multiple folder paths. In fact if you want a specific folder and all of it’s children you really need to do something like this:
where jcr:\path = '//parentpath' or jcr:\path like '//parentpath/%'