machwatt / sf_filecollection_gallery

Simple Image Gallery für TYPO3 CMS which renders a FileCollection containing static or folder based images.
GNU General Public License v2.0
8 stars 11 forks source link

Sorting of gallerys #76

Open criwe opened 7 years ago

criwe commented 7 years ago

Hi! Thx for this extension!

On question: how does the sorting of the gallerys work? Is there a way to manually sort the gallerys? Thx! Best, Chris

machwatt commented 7 years ago

Hi Chris,

which mode do you use?

criwe commented 7 years ago

Hi! Thx for the fast reply!

I use: "nested" (display mode)

Best, Chris

pduersteler commented 7 years ago

Appending here; Sorting in "nested" mode does not work as an Editor would expect it.

Having e.g. given 10 file collections, which you can sort manually with the up/down arrows, the output is not sorted by that given order.

daniz78 commented 6 years ago

In Classes/Service/FileCollectionService.php in function getGalleryCoversFromCollections() the output is passed through sortFileObjects() before returned. Here the file collections are sorted (asc/desc) by the name of the thumbnails not by sorting.

In order to display the file collections by sorting, just: return $imageItems;

instead of: return $this->sortFileObjects($imageItems);