thumbnail image to larger image

6 posts by 4 authors in: Forums > CMS Builder
Last Post: January 18, 2011   (RSS)

By Oakweb - November 4, 2010

Hi

Apologies in advance if this is a bit basic but.. I have created a multiple listing page for displaying doors for a site for a wood merchant. I have created a field for an upload for an image to show up on the listing page and told the system to create a thumbnail of a specific size.

All works fine.

However I want the larger version of the image to show on the detail page but I can only make it show the thumbnail again.

I am sure that there is a really simple answer to this and would be grateful if someone could help me out.

Thanks

Re: [Oakweb] thumbnail image to larger image

Hi Oakweb,

Yes there is.

There are 4 thumbnails that can automatically be set up when you upload an image.

Go to your section editor entry in the admin area and click on modify, then on modify next to your upload field, and then on
"input validation"

You'll see 4 thumbnails that you can set to different sizes to meet your different page requirements.

After you've set the thumbnail 2 to the size that you want it for your larger detail page image (DONT FORGET TO check the box next to thumbnail 2) , click on "recreate". After the new thumbnails are created click "Save".

In your detail viewer, instead of thumbUrlPath, thumbWidth, and thumbHeight

substitute

thumbUrlPath2, thumbWidth2, and thumbHeight2

You'll find lots more information on how CMS Builder works in my CMSB Cookbook http://www.thecmsbcookbook.com

Hope that solves your mystery.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [Oakweb] thumbnail image to larger image

By Jason - November 4, 2010

Hi,

Jerry has a good suggestion here for creating/recreating the thumbnails.

You can also choose to use the fullsize image (not the thumbnail) as well if you like.

You're code to output the thumbnail probably looks something like this:

<img src="<?php echo $upload['thumbUrlPath'];?>" height = "<?php echo $upload['thumbHeight'];?>" width="<?php echo $upload['thumbWidth'];?>" alt="" />

To output the original uploaded image, change the code to this:

<img src="<?php echo $upload['urlPath'];?>" height = "<?php echo $upload['height'];?>" width="<?php echo $upload['width'];?>" alt="" />

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/

Re: [Jason] thumbnail image to larger image

By Oakweb - November 5, 2010

Thank you all very much - all sorted.

Re: [Rusty] thumbnail image to larger image

By Jason - January 18, 2011

Hi Rusty,

You just need to hit recreate when you change the dimensions of your thumbnails or you add a new thumbnail. This is because CMS Builder does the resize when you upload, so if you change the dimensions of your thumbnail, the images you've already created need to be resized. This isn't done automatically since some users may want to only resize future thumbnails, not images already uploaded.

Since you can have up to 4 different thumbnails for an upload field, the code generator doesn't know which one you would want to use, so it defaults to the first thumbnail.

If you like, our consulting service could write some custom code for you to output the second thumbnail if checked. Please let us know if this is something you're interested in.

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/