
Tom P
User

Jan 18, 2012, 12:20 PM
Post #2 of 4
(697 views)
Shortcut
|
|
Re: [Jeffncou] Instant Website: how do I show titles
[In reply to]
|
Can't Post
|
|
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
|