code for when someone clicks on a thumbnail it opens the larger photo in a new window
1. How do I code / where do I put the code to make small images on my website "clickable", so that they open to a larger image? I didn't see this exact post anywhere, though I saw references to it in other posts. I have several list pages on my website which need clickable images. I also have detail pages which need the same thing - basically, a global function on pictures to make them clickable.
2. Also, how to I make image uploads (jpg, gif, etc) default to a consistent position on the page? (Top right, as per the design of the entire site). I use, and instructed my client to use the Insert Image icon to place an image where it belongs on a page. But to make this image clickable, will this functionality still work? Uploads is different from Insert Image.
I really need an elementary level explanation on these, sorry. Many thanks![unsure]
Re: [cmsb] code for when someone clicks on a thumbnail it opens the larger photo in a new window
I'm not sure that I can provide the full detailed explanation you're seeking. That would take a while and also would depend greatly on the specifics of your site. However:
In a nutshell, after you install jQuery and the lightbox add-on library, you'll follow the lightbox instructions to adjust the anchor/link which wraps your thumbnail so that it triggers the use of the lightbox when clicked. You'll wind up with something that may look a bit like:
<a href="fullSizeImage.jpg" rel="lightbox"><img src="myThumb.jpg"></a>
<a href="fullSizeImage.jpg" class="lightbox"><img src="myThumb.jpg"></a>
I don't think you'll want to have this applied to all images on a site or you'll start opening lightbox with every graphical element of your design. However, you can easily make CMSB add the lighbox code to images added to the site via an upload field. For images added by clients via a WYSIWYG editor, you'll have a bigger issue for various reasons. Because of that, we usually create explicit 'upload gallery' fields in our CMSB editors.
2 - The position of your images on your public pages will be determined by where the user inserts the images in the editor and what CSS rules are being applied. This is where seeing the actual site becomes important in order to offer a specific solution. Sorry!
Re: [InHouse] code for when someone clicks on a thumbnail it opens the larger photo in a new window
Many thanks for your ideas.