I have added these links to one page:
Carl-Friedrich-Gauß-Gymnasiums in Schwandorf
Otto-Friedrich
there are more links like that on the same page: http://www.hamoser.net/michael/aboutme

Unfortunately all colorboxes are showing the same title (the one I entered first), although I entered - as you can see - different ones. I even checked the source code, it seems correct (as above). Strange is, that it is working for pictures - they all have different titles - the source code looks the same.

What can I do about that?

Comments

mhamoser’s picture

Sorry, I forgot the code tags, here are the links I meant:
<a href="http://www.c-f-g.de" title="CFG" class="colorbox-load">Carl-Friedrich-Gauß-Gymnasiums in Schwandorf</a>
<a href="http://www.uni-bamberg.de" title="Otto-Friedrich-Universität Bamberg" class="colorbox-load" rel="lebenslauf">Otto-Friedrich-Universität Bamberg</a>

By the way the rel grouping doesn't seem to work correctly either, as you can see I added it just to one link but all links are grouped.

frjo’s picture

I believe you have managed to construct every Colorbox load link in a different way :-).

Change them all so they are constructed like below and it should work:

<a class="colorbox-load" href="http://example.com/?width=1000&height=600&iframe=true" title="The title here">Link text here</a>

Since they lack a rel attribute they will not be grouped by Colorbox.

If you want them to be grouped simple add a rel attribute with the same value to them all, like this:

<a class="colorbox-load" href="http://example.com/?width=1000&height=600&iframe=true" title="The title here" rel="gallery-external">Link text here</a>
mhamoser’s picture

Thank you very much, I thought I tried this way of constructing links first, but it didn't work for me. So I tried other ways - Anyway, it's working now, thank you very much!
Perhaps you could help me with another question: I'm trying the same with video (mp4). I think the link could almost look the same (width, height, title, rel) but what about class (colorbox or colorbox-load - I think the "load" option is just for websites?) and iframe (should this be used or not)? Thanks in advance!

frjo’s picture

For manually building a link to a video (mp4) file I would use Colorbox inline like this:

<a class="colorbox-inline"  href="?inline=true#videotest">Play video</a>

<div style="display: none;"><div id="videotest"><video src="/sites/default/files/test.mp4" width="478" height="359" controls></video></div></div>

This will work in most modern browsers I believe, even IE 9. It will not work in Firefox since they refuse to support mp4, just like Apple refuse to support ogg. It's a mess.

Read more about the HTML 5 video tag at http://diveintohtml5.org/video.html.

mhamoser’s picture

Thanks again!!!

lsolesen’s picture

Status: Active » Closed (fixed)