I need a query to search the and display the results of Dam assest and the CQ:pages using the jcr: last modifed or Cq :last modified,
i have observed that few dam assets not having Cq :last modified, so i have pass the OR condition to check,
and the data will be sorted descending based on Cq :last modified or jcr: last modifed
group.1.path=/content/inside
group.1.type=cq:Page
group.1.property=@jcr:content/cq:lastModified
group.2.path=/content/dam
group.2.type=dam:Asset
group.2.property=@jcr:content/jcr:lastModified
orderby=@jcr:content/jcr:lastModified
order.sort=desc
group.p.or=true
p.limit=-1
Solved! Go to Solution.
Hi,
I don't think you can sort based on two values and get combined results.
I tried below query which give sort results saparatly based on both , you can try and trying modify according to results
group.p.or=true
group.1_group.path=/content/AEM63App
group.1_group.type=cq:Page
group.2_group.path=/content/dam/AEM63App
group.2_group.type=dam:Asset
1_orderby=@jcr:content/jcr:lastModified
order.sort=desc
2_orderby=@jcr:content/cq:lastModified
order.sort=desc
p.limit=-1
Hi,
I don't think you can sort based on two values and get combined results.
I tried below query which give sort results saparatly based on both , you can try and trying modify according to results
group.p.or=true
group.1_group.path=/content/AEM63App
group.1_group.type=cq:Page
group.2_group.path=/content/dam/AEM63App
group.2_group.type=dam:Asset
1_orderby=@jcr:content/jcr:lastModified
order.sort=desc
2_orderby=@jcr:content/cq:lastModified
order.sort=desc
p.limit=-1