Hello, I’m trying to sort items within a browse page block by coding in the vocabulary Visual Resources Association (VRA) by “dateCreated”, but I’m having trouble.
I found an old thread here, which had a similar question and I tried using this format:
sort_field=Visual+Resources+Association,date+Created&sort_dir=a`
but that did not work.
Any thoughts?
Thanks!
I also just tried setting the item browse default under site settings to vra:dateCreated in the Custom option field, but that is not working either.
Ok, I have discovered a way to do it, in an indirect way. I grabbed the resulting browse code, sort_by=numeric%3Atimestamp%3A310&sort_order=desc, when I set up a Browse in the navigation first, and selected from the dropdown, “dateCreated (numeric:timestamp)”.
I’m not sure how the option appeared there in the dropdown in the first place, but I did have that timestamp set in the resource template .
Properties that you have used Numeric Data Types on will get added to the sorting dropdown so that they can be easily sorted in the numeric or date order (versus the default which will order them as if they were plain text).
sort_by and sort_order are the sorting parameters for Omeka S. Numeric Data Types creates its own special options, as mentioned, but the standard textual sort_by can use any property, given as the “term” (i.e., dcterms:date
or vra:dateCreated
)