Need help - how do get path to file set images?

Permalink 1 user found helpful
I'm doing a gallery and have passed a file set image name to a page via $_GET[''] but I need the location of images in the fileset so I can use it to display the image on a new page.

Really stuck, any help would be appreciated.

Thanks

 
kappi replied on at Permalink Best Answer Reply
Got it! I embedded this in a php addon block.

I am aware that there is probably a more efficient process but at the moment it serves it's purpose. I hope this helps someone out at least to solve a small problem initially.

$test=$_GET['id'];  
echo "Test Reuslts".$test ."<br />";
Loader::model('file_set');
Loader::model('file_list');
  $fs = FileSet::getByName('animals');
  $fl = new FileList();
  $fl->filterBySet($fs);
  $fl->sortBy('fsDisplayOrder', 'asc/desc');
  $files = $fl->get();
 foreach($files as $f) {
     $name = $f->getFileName();
     echo "<br />";
     if($name == $test){
     echo "
     <p>