Within Block code files - loading files alphabetically
Permalink
Hi There
I have the flexslider block and it loads images according to their ordering in the file set mechanism.
Born out of laziness / a will to get the right solution I am wondering if there is a small piece of code to change the default file ordering from File Sets to Alphabetical order. (i know I could ask the dev guy but thought it a broader question)
I think it maybe this that does the call:
foreach($images as $imgInfo) {
$f = File::getByID($imgInfo['fID']);
$fp = new Permissions($f);
if ($fp->canRead()) {
$imgpath=$f->getRelativePath();
$img_path_r=$f->getRelativePath();
Am I right and if so would would I change the getByID to be to load in file name order? Just trying to learn a bit more as I go.
Thanks
I have the flexslider block and it loads images according to their ordering in the file set mechanism.
Born out of laziness / a will to get the right solution I am wondering if there is a small piece of code to change the default file ordering from File Sets to Alphabetical order. (i know I could ask the dev guy but thought it a broader question)
I think it maybe this that does the call:
foreach($images as $imgInfo) {
$f = File::getByID($imgInfo['fID']);
$fp = new Permissions($f);
if ($fp->canRead()) {
$imgpath=$f->getRelativePath();
$img_path_r=$f->getRelativePath();
Am I right and if so would would I change the getByID to be to load in file name order? Just trying to learn a bit more as I go.
Thanks