Adding attributes to image object
Permalink Browser Info Environment
Hi All!
Have been working on trying to pass a custom attribute back to the thisCurrentSlide object in Galleriffic.
Here is some of my block controller code in the block controller (modified)
Has anyone got any tips on how to pick this up, maybe on the thisCurrentSlide object on the client?
The puzzling thing is it's not obvious how caption etc get back to the client -- is this using JSON or embedded in the DOM
Would really appreciate any tips
Kind regards
Prema
Have been working on trying to pass a custom attribute back to the thisCurrentSlide object in Galleriffic.
Here is some of my block controller code in the block controller (modified)
function prepareImageArray(){ $gallery_json = new stdClass(); $gallery_json->meta = new stdClass(); $gallery_json->meta->order = Array(); $gallery_json->meta->orderPointer = 0; $image_info = Array(); foreach($this->images as $image){ $tmp = $image; $f = File::getByID($image['fID']); $tmp['f'] = $f; // Get approved version of file $fID=$image['fID']; $thisFile=File::getById($fID); $fv=$thisFile->getApprovedVersion(); // Get BTS URL Attribute
Viewing 15 lines of 36 lines. View entire code block.
Has anyone got any tips on how to pick this up, maybe on the thisCurrentSlide object on the client?
The puzzling thing is it's not obvious how caption etc get back to the client -- is this using JSON or embedded in the DOM
Would really appreciate any tips
Kind regards
Prema
Type: | Discussion |
---|---|
Status: | New |
Hope this helps.
JB