Sort order possibility?
Permalink Browser Info Environment
Is there any possibility to add a sort order besides the drag and drop?
Type: | Discussion |
---|---|
Status: | New |
Can you please clarify what you mean? I'm not sure I understand.
Like "Sort by latest on top" "sort by recent) (descending or ascending)
Oh, I understand. No, sorry -- that functionality does not exist.
Is there any possibility to create and use it in an update?
Sorry, but it's very unlikely that I will add this functionality. You're the only person to ever ask for it, so I don't want to complicate the code and clutter the UI with something that most people won't be using.
If there's just one sort order that you know you'll always want, a solution could be to download my free "Simple Image Gallery" addon (http://concrete5.org/marketplace/addons/simple-image-gallery... ) and modify the code to sort them as needed. Let me know what sort order you would want it to use and I can tell you what code to swap out.
But if you need to be able to choose from various sort orders in the edit window, unfortunately I don't have a solution for you.
If there's just one sort order that you know you'll always want, a solution could be to download my free "Simple Image Gallery" addon (http://concrete5.org/marketplace/addons/simple-image-gallery... ) and modify the code to sort them as needed. Let me know what sort order you would want it to use and I can tell you what code to swap out.
But if you need to be able to choose from various sort orders in the edit window, unfortunately I don't have a solution for you.
count me as number two who would like that option.
Hello,
I also purchased Deluxe image gallery.
I would also like to have gallery with automatically sorting "Sort by latest on top" when one upload latest picture in gallery.
Can you tell us for "Simple Image Gallery" what code to swap out and where? That would be mindblastish.
Thank you in advance.
M
I also purchased Deluxe image gallery.
I would also like to have gallery with automatically sorting "Sort by latest on top" when one upload latest picture in gallery.
Can you tell us for "Simple Image Gallery" what code to swap out and where? That would be mindblastish.
Thank you in advance.
M
I looked at the core code, and actually I am not sure it's possible at all to sort files by date. I Think I see a way that you could sort by the timestamp, but this is only the last time any data changed for the image (which might be good enough for you in this case). To modify the Simple Image Gallery to sort on the timestamp, I think you could change line #15 in /packages/simple_image_gallery/models/simple_image_gallery.php from this:
...to this:
I'm not 100% sure about this, but it's worth a try.
-Jordan
$fl->sortByFileSetDisplayOrder();
...to this:
$fl->sortBy('timestamp', 'DESC');
I'm not 100% sure about this, but it's worth a try.
-Jordan