Some thumbnail/image problems

2 posts by 2 authors in: Forums > CMS Builder
Last Post: August 19, 2010   (RSS)

Re: [degreesnorth] Some thumbnail/image problems

By Jason - August 19, 2010

Hi,

I think we can take care of all of these.

1) %20 is the way a web browser represents a space character in the url string. To fix this, go into your section editor and click on "Viewer Urls". In the boxes "List Page Url" and "Detail Page Url" make sure there are no spaces after the name of the page (ie lease.php). That should take care of that problem for you.

2) You can add <a> tags around your <img> tag for your thumbnail. Here is an example of how it may look. (Note: you'll probably have to change names based on the variables you're using on your page and the names in your database)

<?php foreach ($record['images'] as $upload): ?>
<?php if($upload['hasThumbnail']): ?>
<a href="<?php echo $record['_link'];?>"><img src="<?php echo $upload['thumbUrlPath']; ?>" height="<?php echo $upload['thumbHeight']; ?>" width="<?php echo $upload['thumbWidth']; ?>" /></a>
<?php endif ?>
<?php endforeach ?>


3) For this part, all we need to do is remove the code that will display a thumbnail. Try replacing it with this:

<?php foreach ($lease_warehouseRecord['property_image_right'] as $upload): ?>

<?php if ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>

<?php endif ?>
<?php endforeach ?>


Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/