Choosing the order of a group of filesets
Permalink
I'm trying to get an image library block working which has number of image files of different types for each image.
I'm using filesets, iterating through them and displaying a thumbnail for the first image in the set (as all them files are going to be the same image).
I've got the bare bones of that working, but I need to be able to manually sort the order that the file sets are displayed and I don't seem to be able to change the order of the file sets by dragging them in the back end. It is just displaying them in the order that they were created.
I'd appreciate any advice in how to tackle this.
I'm using filesets, iterating through them and displaying a thumbnail for the first image in the set (as all them files are going to be the same image).
I've got the bare bones of that working, but I need to be able to manually sort the order that the file sets are displayed and I don't seem to be able to change the order of the file sets by dragging them in the back end. It is just displaying them in the order that they were created.
I'd appreciate any advice in how to tackle this.
<?php Loader::model('file_list'); Loader::model('file_set'); $filesets = FileSet::getMySets($user = false); ?> <?php foreach ($filesets as $fset) { $fsn = $fset->getFileSetName(); echo "Name : $fsn"; echo "<p>"; $fl = new FileList(); $fl->filterBySet($fset); $fl->sortByFileSetDisplayOrder($gs); $files = $fl->get(); //$fl->get((1)$this->1, 0);
Viewing 15 lines of 38 lines. View entire code block.