Instant Website: how do I show titles

By JeffC - January 18, 2012

Hi,

I am using Instant Website with the fancybox plugin to display images. The default set up displays Image 1/2 etc, when clicking an image. I would like to add the title of the image.

I have looked at the fancybox website and it seems that this should be straightforward by changing the showtitle attribute from false to true but I have tried without success.

showtitle appears a number of times and I have tried to change each by trial and error. I wonder if anyone can help by telling me which file and which line needs to be changed.

Thanks
Jeff

Re: [Jeffncou] Instant Website: how do I show titles

By (Deleted User) - January 18, 2012

Hi Jeffncou,

To add a title to an image being loaded by fancybox you just have to add the title to the anchor tag wrapped around the image tag:

<a href="<?php echo $upload['urlPath'] ?>" rel="photo_group" title="<?php echo htmlspecialchars($upload['info1']) ?>"><img ... /></a>

In the line above, the title is being set by the data from $upload['info1']. You could use text from any of the five 'info' fields supported, as long as you have set the field to be used in CMSB.

Fancybox will then take the title text and display it in the bar at the bottom of the photo.

For more tips on the different ways to use fancybox, check out http://fancybox.net/home.

Hope that helps!

Tom

Re: [Jeffncou] Instant Website: how do I show titles

By Jason - January 19, 2012

Hi,

If you could fill out a [url http://www.interactivetools.com/support]2nd Level Support Request[/url] and point us towards the pictures that aren't working, we can take a quick look for you.

Thanks,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/