How to include a caption (a cck field) in lightbox? I'm working on a theme i bought and since i'm just learning php i'm having a hard time including a field as a description text in the lightbox once the thumbnail is clicked.

Here's the code (that's in the tpl.php file) that outputs the thumbnails (from a view)

&lt;?php
if (isset($fields['field_image']-&gt;content) and strpos($fields['field_image']-&gt;content, '&lt;img')) {
 print str_replace('&lt;a ', '&lt;a rel="prettyPhoto[gallery]" ', $fields['field_image']-&gt;content); ...
?&gt;


Here's the html version of the lightbox script :

&lt;a href="images/fullscreen/1.jpg" rel="prettyPhoto[gallery]" title="caption."&gt;&lt;img ...


How can in include the caption tag ?

Thanks !!
&lt;a title="caption"&gt;&lt;img alt="description"&gt;&lt;/a&gt;


Both the caption and the description will be displayed on the image preview.