CMS Product images
4 posts by 2 authors in: Forums > CMS Builder
Last Post: March 13, 2008 (RSS)
By Roj - March 12, 2008
Hi All,
I am just taking CMS builder for a test drive and all looks good so far.
Just one thing, I am have a bit of a problem that I am sure some one can help me with.
I am creating a multi product page and I would like to put a thumbnail on the list page and a full size image on the product page but I can't seem to get my head around how to do this.
Any help would be appreciated
Thanks
I am just taking CMS builder for a test drive and all looks good so far.
Just one thing, I am have a bit of a problem that I am sure some one can help me with.
I am creating a multi product page and I would like to put a thumbnail on the list page and a full size image on the product page but I can't seem to get my head around how to do this.
Any help would be appreciated
Thanks
Roj
Re: [Roj] CMS Product images
By Dave - March 12, 2008
No problem. I'm assuming you've already got your list page and product page viewers setup right? And that you have images displaying on both pages?
If so, just use this code on the list page:
and this code on the product page:
Hope that helps, let me know if I can provide more details or if you have any problems with that.
If so, just use this code on the list page:
<?php foreach ($listRows as $record): ?>
...
<?php foreach (getUploads($options['tableName'], 'uploads', $record['num']) as $upload): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>"
width="<?php echo $upload['thumbWidth'] ?>"
height="<?php echo $upload['thumbHeight'] ?>"
alt="" /><br/>
<?php endforeach ?>
...
<?php endforeach ?>
and this code on the product page:
<?php if ($record): ?>
<?php foreach (getUploads($options['tableName'], 'uploads', $record['num']) as $upload): ?>
<img src="<?php echo $upload['urlPath'] ?>"
width="<?php echo $upload['width'] ?>"
height="<?php echo $upload['height'] ?>"
alt="" /><br/>
<?php endforeach ?>
<?php endif ?>
Hope that helps, let me know if I can provide more details or if you have any problems with that.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com
Re: [Dave] CMS Product images
By Roj - March 13, 2008
Hi Dave,
Yes that did help. I had to change 'uploads' to 'images' in the first line of your code to get it to work but it is fine now.
Thanks
Yes that did help. I had to change 'uploads' to 'images' in the first line of your code to get it to work but it is fine now.
Thanks
Roj
Re: [Roj] CMS Product images
By Dave - March 13, 2008
Sounds good, glad to hear it's working. :)
If you have any more questions just post and we'll help you out.
If you have any more questions just post and we'll help you out.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com