Gallery: Sorting subgalleries manually

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
caigner
Forum Members
Forum Members
Posts: 52
Joined: Sun Aug 16, 2020 5:29 am

Gallery: Sorting subgalleries manually

Post by caigner »

I know how to arrange the order of images within a (sub)gallery by drag and drop. Works fine.

But I need to arrange the order of subgalleries, but I couldn't find a way. Not by drag and drop and not by any other means.

Do I really have to manipulate data in the database to change the order of subgalleries? I hope not.

Please help!

Christian
I am using CMSms 2.2.19
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1698
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Gallery: Sorting subgalleries manually

Post by DIGI3 »

I don't think you'd be able to do it in the database as it's just sorting alphanumerically, as they are in the file system. Other than a feature request to the module author, the easiest way would probably be to do it in your foreach loop in the template. This blog post could get you started, with more options available by googling PHP's sort options. https://cmscanbesimple.org/blog/sort-array-modifier

Of course the other option would be to create your folders with leading numbers, e.g. 001_foo, 002_bar, etc. You could trim those off for display in the template.
Not getting the answer you need? CMSMS support options
User avatar
caigner
Forum Members
Forum Members
Posts: 52
Joined: Sun Aug 16, 2020 5:29 am

Re: Gallery: Sorting subgalleries manually

Post by caigner »

Thanks. I shall give the renaming a try.

A pity, that drag and drop for reordering entries is on a per module base and not a general feature of CMSMS.

Anyway, thanks for your help.
I am using CMSms 2.2.19
User avatar
caigner
Forum Members
Forum Members
Posts: 52
Joined: Sun Aug 16, 2020 5:29 am

Re: Gallery: Sorting subgalleries manually

Post by caigner »

I just found out how to arrange subgalleries by drag and drop!

1. Open Gallery in the navigation on the left.

2. Open any Subgallery
On top you will see List / Gallery / YourSubGallery

3. Klick on the Gallery link.
You are back to the list of Subgalleries, but now you can re-arrange them by dragging and dropping, like with images.

This is a little bit awkward to get there but it works.
I am using CMSms 2.2.19
Post Reply

Return to “Modules/Add-Ons”