Gallery in Dynamic Category Page

How can I order the items in my Gallery on my dynamic category page so the items appear alphabetically? They currently appear from newest to oldest.

Also, when clicking the image, the link opens in another tab. Is it possible to change it so the link opens in the current page. If so, how?

Thanks

Hello

one way to sort a gallery items is using code!
on ready you get the gallery items, then you sort them(based of the alphabetical order of each image title for example), and then you set the gallery items to the sorted items:

let items= $w('#gallery1').items
await items.sort((a,b) => (a['title']> b['title']) ? 1 : ((b['title'] > a['title']) ? -1 : 0));
$w('#gallery1').items = items

for the next point you can set the link target using code, check this out.

Best
Massa