image gallery FileSet question

Permalink
I found this in the concrete5 File Object documentation:

$r = $f->inFileSet(FileSet $fs)

Queries the FileSet $fs and returns true if the current file exists within it.

I'm not a pro php developer but I'm interested in leaning how to use this to build an image gallery that tags images with there file set.

So there would be a master file set that all the images will be in and then if it sees that they are also in another file set then display the names of any other set they are in.

can this be done some how? I already have a gallery block that has a foreach to output a set of images.

chris123uk
 
hutman replied on at Permalink Reply
hutman
I think that you would probably be better off to use
$sets = $f->getFileSets();
in your loop, so when you have the file you can get a list of which sets that file is in and output them as needed.
chris123uk replied on at Permalink Reply
chris123uk
so if i had this code, how would i work that in?

<?php foreach ($images as $img): ?>

<?php echo $img->large->src; ?>

<?php endforeach; ?>



$sets = $f->getFileSets();


what is $f ?
does it rely on some helper?
do i need to pass the images id with $img->getFileId();