File Set order Issue 5.4.1
Permalink
In Concrete 5.4.1 you can order a file set but the file order in the set attributes is being ignored by the simple gallery block when using pics from a file set. Anyone else having same issue?
Thanks for that - for some reason I was thinking of a bought add-on block as part of the core. Have asked the developer to check it out as you suggest. Thanks Phil
Hi,
You can fetch the fileset names and ids from the filesets database table and using the fileset id, you can fetch the fids (image ids) from filesetfiles database table. By using the image id (fid) you can easily get the respective image.
You can fetch the fileset names and ids from the filesets database table and using the fileset id, you can fetch the fids (image ids) from filesetfiles database table. By using the image id (fid) you can easily get the respective image.
I'm not sure this is applicable to the OP -- he's not building his own gallery, but rather using one from the marketplace.
Same issue with the Highslide add on.
It's a pretty simple fix to any code that doesn't use the new display ordering for a fileset.
Somewhere in the controller or model getting your dataset, there will be something like:
before the get(), do a:
Somewhere in the controller or model getting your dataset, there will be something like:
$fileList = new FileList() $fileList->filterBySet($fs); $fileList->filterByType(FileType::T_IMAGE); $files = $fileList->get();
before the get(), do a:
$fileList->sortByFileSetDisplayOrder();
If the marketplace one, it's possible that the developers haven't updated it to work with the new sorting functionality yet -- in which case you should log a support request with them.