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.
I would like to be able to use [nid] as the custom gallery of the Colorbox trigger field. Thereby creating a per post gallery for each view result. This doesn't seem possible at the moment - please correct me if I'm wrong...
Comment | File | Size | Author |
---|---|---|---|
#4 | allow_tokens_in_custom_gallery-1779834-4.patch | 1.86 KB | BWPanda |
Comments
Comment #1
nodecode CreditAttribution: nodecode commentedI agree this is very necessary. I'm trying to work around this by rewriting the output of the field but so far I haven't figured it out yet.
Comment #2
ajmartin CreditAttribution: ajmartin commentedI had an attempt at that too, without success. I'd be keen to know if you find a work around. The only way I can see to make it happen is by allowing replacement patterns in the custom gallery...
Comment #3
tfranz CreditAttribution: tfranz commentedMy solution was this:
Changed some lines in modules/colorbox/views/colorbox_handler_field_colorbox.inc (Colorbox 7.x-2.3)
Line 160ff:
After that you can use tokens – for example [nid] – in the field "Custom Colorbox gallery".
Comment #4
BWPanda CreditAttribution: BWPanda commentedHere's a patch of the changes from #3, with the addition of the line:
You may enter data from this view as per the "Replacement patterns" below.
to the description of the Custom Colorbox gallery field.Works for me.
Comment #5
frjo CreditAttribution: frjo commentedCommitted to 7.x-2.x. Thanks for the contribution BWPanda!
Comment #6
frjo CreditAttribution: frjo commentedComment #8
haradhansharma CreditAttribution: haradhansharma commentedi am using 7x2.5 of colorbox. Just type [nid] in "Custom Colorbox gallery " but didnt grouped the image per post. Would anybody advise an example to implement. I want to make per post galary in the view using replacement patern in popup.