Clicking on tumbnail should link to full sized image

2 posts by 2 authors in: Forums > CMS Builder
Last Post: January 27, 2009   (RSS)

By (Deleted User) - January 27, 2009 - edited: January 27, 2009

Hi,

I generated the code and clicked on "Show File Updates".

For reference, this is the page:
http://qualitystrapping.com/strapping_kits/steel_strapping_kits_item.php?QS-K34-2

This is the listing page:
http://qualitystrapping.com/strapping_kits/steel_strapping_kits.php


This is the code on my site:

<?php

require_once "/cmsAdmin/lib/viewer_functions.php"; list($steel_strapping_kitsRecords, $steel_strapping_kitsMetaData) = getRecords(array(
'tableName' => 'steel_strapping_kits',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$steel_strapping_kitsRecord = @$steel_strapping_kitsRecords[0]; // get first record



?>

<!-- STEP2: Display Records (Paste this where you want your records to be listed) -->


<strong>Product Code:</strong> <?php echo $steel_strapping_kitsRecord['product_code'] ?><br/><br/>
<?php echo $steel_strapping_kitsRecord['product_name'] ?><br/><br/>
<?php echo $steel_strapping_kitsRecord['description'] ?><br/>
<strong>Shipping Weight:</strong> <?php echo $steel_strapping_kitsRecord['shipping_weight'] ?><br/>
_link : <a href="<?php echo $steel_strapping_kitsRecord['_link'] ?>"><?php echo $steel_strapping_kitsRecord['_link'] ?></a><br/>





<!-- STEP 2a: Display Uploads for field 'product_images' (Paste this anywhere inside STEP2 to display uploads) -->
<!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
<?php foreach ($steel_strapping_kitsRecord['product_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 ?>
<!-- STEP2a: /Display Uploads -->




<hr/>
<?php if (!$steel_strapping_kitsRecord): ?>
No record found!<br/><br/>
<?php endif ?>
<!-- /STEP2: Display Records -->



<a href="<?php echo $steel_strapping_kitsMetaData['_listPage']; ?>">&lt;&lt; Back to list page</a> -
<a href="mailto:?subject=<?php echo thisPageUrl() ?>">Email this Page</a>