I need to display additional information in the colorbox caption for image fields. The only way I am able to do this was with views colorbox trigger field, however, this forces me to set an explicit width and height for the pop up window. The images that I want to display in the pop up are in horizontal and vertical format, and I want the width and height to be adjusted accordingly... so I can't set an explicit dimension.
It would be nice if there was an option to simply change the caption when selecting the colorbox formatter for an image field instead of the long-winded excluded fields + colorbox trigger.
Comments
Comment #1
frjo CreditAttribution: frjo commentedThis would be a neat feature. I will take a look at how easy it would be to implement in a nice and clean way. It will however most likely take some time before I commit time to it.
Comment #2
iancu35 CreditAttribution: iancu35 commentedit would be nice to have a "description/ teaser" caption hover options, besides "title, alt text, node title"
so you can choose using CTRL two/ more options at one time for an image colorbox formatter in: a view slideshow/ ddblock
eg. photo + title + description - fluid height/ width
many thks. frjo for your work and screencasts
Comment #3
pollegie CreditAttribution: pollegie commentedSubscribing
Comment #4
ohcray CreditAttribution: ohcray commentedsubscribing
Comment #5
frjo CreditAttribution: frjo commentedYou now can use tokens to construct the caption in the Colorbox formatter. That should fill this need I believe.
Comment #7
jonvaljean CreditAttribution: jonvaljean commentedHello, thanks to frjo for the great work and instructive videos.
I would like to do this, but frjo's post
You now can use tokens to construct the caption in the Colorbox formatter. That should fill this need I believe.
is a little too little for me to follow. Could anyone give a more expansive explanation, so I could try this ?
Thanks.
Comment #8
frjo CreditAttribution: frjo commentedGo to your content types "Manage display" tab and go to the formatter settings for your image field (the small cog wheel to the right).
There you have different options for the Caption. If you want to use tokens select "Custom (with tokens)".
Comment #9
jonvaljean CreditAttribution: jonvaljean commentedThank you frjo for this response.
I am afraid that I am wasting your time, but I am too new to this to understand "how to use tokens" ... I am simply trying to use the caption space to insert some formatted HTML, not just a caption, but a description. I do not know how to enter this HTML, since I do not know "how to use tokens".
Could you or someone give me a little more direction ?
THanks for your patience.
Jon
Comment #10
BWPanda CreditAttribution: BWPanda commentedI came across the same issue as the original poster - wanting to use a custom caption but not liking the way the Colorbox trigger field made me specify an explicit width and height... I also didn't want to use tokens (as the data I needed was already in Views).
I discovered that you can use Views' own replacement patterns to specify the width and height of the Colorbox popup (assuming you're displaying an image in Colorbox):
You can now use the full power of the Colorbox trigger field, but don't have to worry about setting an explicit width and height.
BTW, I'm not sure why the extra alt, title, width, etc. options don't appear under all the other 'Replacement patterns'...
Comment #11
highflyer CreditAttribution: highflyer commented#10 works great. Thank you:)