Forum

Thread tagged as: Question, Addons, Gallery

Gallery image description display

I wish to display gallery image description text beneath the image as it displays on my image.php page.

Simple display of just the image works using the standard:

<?php 
    perch_gallery_image(perch_get('id'));
?>

but I can't make the leap to getting custom templates to work (which is what I think I need next).

Would someone be kind enough to give me a little shove in the right direction?

Paul Moynihan

Paul Moynihan 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

perch_gallery_image(perch_get('id'), array(
    'template' => 'your_custom_template.html',
));

A ha!!! Thanks, Drew, this nudge helped and I then found the other bit of the puzzle I was missing . . . . I didn't have anything in the template html file to display the image itself

I now have

<img src="<perch:gallery id="main" />" width="<perch:gallery id="main-w" />" height="<perch:gallery id="main-h" />" />
<perch:gallery id="desc" type="textarea" label="Description" size="s" textile="true" editor="markitup" />

and it works. Terrific.