Instant Website: how do I show titles
4 posts by 3 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: January 19, 2012 (RSS)
By JeffC - January 18, 2012
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
Re: [Jeffncou] Instant Website: how do I show titles
By (Deleted User) - January 18, 2012
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: [Tom P] Instant Website: how do I show titles
By JeffC - January 19, 2012
I have the anchor tag wrapped around the image tag. But it is not working for me - i think there must be a setting within the js that needs to be amended.
Here is my code:<div id="photoGallery">
<?php foreach ($portfolioRecord['images'] as $upload): ?>
<div class="photo">
<a href="<?php echo $upload['urlPath'] ?>" rel="photo_group" title="<?php echo htmlspecialchars($upload['info1']) ?>"> <img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="<?php echo htmlspecialchars($upload['info2']) ?>" /></a>
</div>
<?php if (@++$count % 3 == 0) { echo '<br clear="all"/>'; } ?>
<?php endforeach ?>
</div>
<?php endif ?>
Visit your instant website demo site you can see what I mean: Click on the scrabble picture and it will load with fancybox without a caption (it will just say image 1/2).
What I would like to achieve can be seen here: http://fancybox.net/home. Click on the bottom left image of the girls jumping in front of a garage door. You will see that it says Image 1/3 Custom Title.
Thanks very much
Re: [Jeffncou] Instant Website: how do I show titles
By Jason - January 19, 2012
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/