Hi
Normally one follows the recipe of querying a folder, get the UID and next issue a startswith on the ecm:path to get the contents of a folder (Workspace, Section).
With Collections it is a different cookie:
$query = "SELECT * FROM Document WHERE ecm:path = '/default-domain/workspaces/" . $workspace . "/" . $collection . "'" ;
$filter = "ecm:currentLifeCycleState != 'deleted'";
`
follwed by:
getDocumentUiD
and somthing like:
$query = "SELECT * FROM Document WHERE ecm:path STARTSWITH '/default-domain/workspaces/" . $workspace . "/" . $collection . "' AND ecm:parentId='".$parid."'" ;
$query .= " AND " . $filter;`
This does not work as a Collection is not a folder with Documents in it, but is a thing with links to Documents. So when using the above query you get an empty resultset. ("file not found"). This makes sense as the UID of the parent of an item in the collection is not the Collection itself, but the folder in which the Document resides (the location being linked to from the collection).
So this leaves the question: how to get the items in a collection using NXQL as @children is not an option?