Gallery Block - addtl attributes

Permalink
I have extended the purchased gallery block with additonal data attributes but am having trouble displaying them when the image is viewed.
I can only display one attribute at a time by changing the echo imgInfo caption portion of the statement in the view.php file. I have tried to extend this statement by adding the mydata value as shown in the second code block below but get errors....syntax help is appreciated.

This first codeblock shown sets the caption variable.

Thanks,
-mark

<?php  $caption = array_key_exists('caption', $imgInfo) ? $imgInfo['caption'] : $f->getTitle();?>


<a href="<?php echo $f->getRelativePath()?>" title="<?php echo $imgInfo['caption' , 'mydata']?>"<?php $ih->outputThumbnail($f,$thumbnailWidth,$thumbnailHeight,''); ?></a>

marxion