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)
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


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
View Replies:
jb1 replied on at Permalink Reply
jb1
Hi Prema, it's actually quite simple the method used for passing in the title and description. You'll see a DIV tag for each image with a class of "image-titleg" or "image-descg". This is displayed. The view.php file checks if those attributes are set and controls the writing of this (line 92 - 111).

Hope this helps.

JB
prema520 replied on at Permalink Reply
Dear JB!
Cool as -- thanks very much.
Really appreciate the help
Kind regards
Prema

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.