Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Image alt and title tokens are unavailable in the Colorbox caption options, so it doesn't seem possible to build a caption using image meta information. See https://www.drupal.org/node/1947796
The tokens work with Colorbox trigger, but using [nid] in the Custom Colorbox Gallery does not limit the gallery by node, but shows all images in the query. See https://www.drupal.org/node/1779834
Any suggestions on how to make this work?
Comment | File | Size | Author |
---|---|---|---|
#6 | colorbox-tokens-unavailable-to-colorbox-2319483-6.patch | 1.18 KB | partdigital |
Comments
Comment #1
partdigital CreditAttribution: partdigital commentedI ran into the same problem, it was caused by this found in colorbox_handler_field_colorbox.inc
It was stripping out all tokens before they could be substituted. I fixed it with this patch.
Comment #2
partdigital CreditAttribution: partdigital commentedComment #4
Sill CreditAttribution: Sill commentedThis had me stumped for way too long... It definitely strips off the tokens. The technical parts of the patch above worked great, so I've tried to rework the patch. Hopefully this works.
Comment #5
Sill CreditAttribution: Sill commentedComment #6
partdigital CreditAttribution: partdigital commentedI can confirm this works. I've updated the patch to remove some commented out code.
Comment #7
partdigital CreditAttribution: partdigital commentedComment #8
frjo CreditAttribution: frjo commentedThanks fro the contribution!
Committed to 7.x-2.x with a very minor change.