stdio.h
stdio.h

Reputation: 126

dam search/sort based on file size

How can I sort my search based on file size in DAM. I'm trying this and the sorting doesn't seem to work maybe because dam:size is a string:

type=dam:Asset
path=/content/dam/<my_project>
nodename=*.pdf
orderby=@jcr:content/metadata/dam:size
orderby.sort=desc

Upvotes: 0

Views: 711

Answers (1)

bfitzpatrick
bfitzpatrick

Reputation: 1513

With XPath, you can do it like this: /jcr:root/content/dam/<site>//element(*,dam:Asset) order by jcr:content/metadata/@dam:size descending

Upvotes: 2

Related Questions