Images show in admin not in pages

5 posts by 3 authors in: Forums > CMS Builder
Last Post: November 8, 2010   (RSS)

Using the image code generated by the Code Generator, images associated with listings don't appear in the listings or listingDetail pages. Here is the image code output by the software for the listings page:

<?php foreach ($rm_listingRecords as $record): ?>

<?php foreach ($record['images'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" style="float: left; margin: 0 12px 0 0;" />

<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" style="float: left; margin: 0 12px 0 0;" />
<?php endif ?>
<?php endforeach ?>

Here is the code output for the listingDetails page:

<?php foreach ($rm_listingRecord['images'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>

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

<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>

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

Any help with this appreciated,

Bob

Re: [orangecat] Images show in admin not in pages

By Chris - November 8, 2010

Hi Bob,

There are a couple things that could be going wrong here. Can you provide a URL to see the pages where the images are missing?
All the best,
Chris

Re: [chris] Images show in admin not in pages

Hi Chris,

Listings index page:
http://www.kylandsales.com/listings.php

Then click the live address for the Details page. Images are missing on both.

Thanks,
Bob

Re: [chris] Images show in admin not in pages

By Damon - November 8, 2010

Hi,

Just an update with the solution to this issue.

The images, along with listings data were imported from Listings Manager into CMS Builder. The thumbnail image height and width in the database had "0" values which caused the images to not appear on the site.

The solution was to go into the Upload field within CMS Builder through the Section Editor, and recreate the thumbnails. This added all the thumbnail height and width details to the database and they are now visible on the site.
Cheers,
Damon Edis - interactivetools.com

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