When using Lightbox2 to display content (image or video) in a lightbox, if you want to have it triggered with a text link, the hover shows the html markup intended for the caption in the lightbox.

This is remedied with an img link by supplying a title attribute for the img itself. However, I think this could be improved.

I'd love to see something like the following:

<a title="Video Name" rel="lightvideo[width:320px; height:240px; title:'<h2>Video Name</h2><h3>Caption Text</h3>';]" href="videofile.fla">Show Video</a>

This would allow you to completely divorce the anchor title and the caption text you see when the lightbox loads.

Comments

stella’s picture

Status: Active » Fixed

I've implemented this, but it's not exactly the same as your proposal. To specify the caption in the rel attribute use the following format:

<a href="videofile.fla" rel="lightvideo[width:320px][<h2>Video Name</h2><h3>Caption Text</h3>]">Show video</a>

Note the caption is in it's own square brackets. This was done to facilitate easier parsing. A title attribute can still be specified, and it will be used if there is no title provided in the rel attribute. This will allow existing users of the lightbox2 module to upgrade without having to modify all of their links.

This will be included in the next dev release, available later today.

Cheers,
Stella

jrefano’s picture

wow, hows that for fast service! thank you very, very much!

stella’s picture

Released in Lightbox2 5.x-2.8 and 6.x-1.8.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.