In my gallery, what i write as image title is the caption of my image and that is great. Now I would like to add a link (external url) to my caption, how can i do that? I already try to write normal url and html a tag but is always ignored.

I see two option in Colorbox configuration related some link, i play a bit with that but I didn't really understand what i'm supposed to do with that

How did you do?

EDIT: Add screenshots step by step adding link for title

My Colorbox gallery is placed in custom 'Photo Gallery' Content type. Here there are a list of images with Alt and Title. This images are automatically grouped thanks another view "Gallery Photo" which display the first image and then thanks to colorbox open all the other inside it as a gallery.


enter image description here enter image description here enter image description here enter image description here enter image description here


2 Answers 2


You need to do it with JQUERY,there is another way as patching colorbox,but by default color box dont support link as title

   $('#cboxTitle').html('<a href="yourlink.com">title</a>');
  • cool! thanks for the tip. So you mean to add that line in the img Title UI field? I try and it show me the code as caption Commented Nov 23, 2014 at 20:30
  • @GiorgiaSambrotta, you can inspect the element title and just need put its id in jquery selector, my code is a clue :)
    – Yuseferi
    Commented Nov 24, 2014 at 6:07
  • i see! That is ok but it will be not very customizable from clients Commented Nov 24, 2014 at 12:35

Follow the steps given in this tutorial and then add one extra field as shown in below snapshot.

enter image description here

Give your external link to this field as shown below

enter image description here

Final step would be to use replacement pattern for this field in colorbox trigger caption field along with the title.

enter image description here

enter image description here

Sample output:

enter image description here

I have tested it and its working.

  • wow! Thank you very much for your time. I'm going to try now :) Commented Nov 25, 2014 at 11:34
  • Mhmm i'm doing something wrong from the beginning because nothing really change to me. I create a view of content type 'Gallery Photo' then I make this view as Block. Is right or should be a page? then I create all the fields explained in the tutorial and yours field. Should I maybe do something more, obvious to you(but not to a beginner like me:) )? Commented Nov 25, 2014 at 11:53
  • Also: Adding Global:Custom Text field basically will give me the chance to add an external link as title, but Will be always the same link for all the caption? And every time need to be changed, admin need to change it from the view, not from the gallery in it self, is this correct? Commented Nov 25, 2014 at 11:55
  • You can give title to your external link using Replacement patterns. example: instead of using 'External link' as title you can replace it with '[title]' or any other. Where [title] is your replacement pattern.
    – echo
    Commented Nov 25, 2014 at 13:05
  • ok! But I still don't see the title as link. Custom or not is still a plain text Commented Nov 26, 2014 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.