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

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

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/