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: [Oakweb] thumbnail image to larger image

By Rusty - January 18, 2011 - edited: January 18, 2011

Why do I have to hit recreate? That's a bit tedious.

I initially added a second thumb to be created when I created the section editor.

Do I have to hit recreate every single time the upload changes, or just the first time that I'm adding the additional thumb?

Also shouldn't CMSBuilder check to see if Thumbs2 is checked, and if so display that in the Code Generator?

Having to know that I need to write thumbUrlPath2 and all that is tedious is well (as opposed to copying and pasting)
Rusty