Info 1 etc doesn't display on viewer
6 posts by 2 authors in: Forums > CMS Builder
Last Post: August 28, 2008 (RSS)
Let's say a have an upload call "img1".
Into it, i'v defined info1 as "img1-description1
When generating code for my details page, i cannot see mar "img1-description1" showing beside of my image uploaded "img1".
Is that normal?
Should i have to do something special?
Re: [willbegood] Info 1 etc doesn't display on viewer
By Dave - August 28, 2008
Try adding this tag to your viewer where you want info1 displayed:
<?php echo $upload['info1'] ?>
Let me know if that works for you.
interactivetools.com
Re: [Dave] Info 1 etc doesn't display on viewer
Re: [willbegood] Info 1 etc doesn't display on viewer
By Dave - August 28, 2008
Can you attach your viewer file to this post so we can see the code?
Thanks!
interactivetools.com
Re: [Dave] Info 1 etc doesn't display on viewer
and see the attached viewer file.
Re: [willbegood] Info 1 etc doesn't display on viewer
By Dave - August 28, 2008
The viewer code shows a different block of code for thumbnails and full size images. Try including the info1 in the thumbnail code (in red):
<?php foreach ($interventionsRecord['img1'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img class="imgIntervention" src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>
<?php echo $upload['info1'] ?>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php echo $upload['info1'] ?>
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
<?php endif ?>
<?php endforeach ?>
And if you know you're always going to have only thumbnails you can simplify this code:
<?php foreach ($interventionsRecord['img1'] as $upload): ?>
<img class="imgIntervention" src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>
<?php echo $upload['info1'] ?>
<?php endforeach ?>
Hope that helps!
interactivetools.com