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.
Hi,
I'm looking to colorbox to replace the behavior of Lightbox2 on my drupal 8 site.
I have installed the version 1.4, put the js on the libraries folder but i don't know what classes i need to put on the link to make it open on an iframe, any suggestion?
I have already tried iframe cboxElement and colorbox-load but seems not to work
Comments
Comment #2
FenixGhost CreditAttribution: FenixGhost commentedNeed help with iframe! haven't being able to make a link to open with colorbox iframe... any one?
Comment #3
stewest CreditAttribution: stewest at Amazee Labs commentedHi. Maybe you could do some custom behaviours? (as long as colorbox is loaded in your theme, or else add maybe see if adding
{{ attach_library('colorbox/colorbox') }}
to your twig templateComment #4
akalata CreditAttribution: akalata commentedI was able to get this working by using hook_colorbox_settings_alter (see colorbox.api.php) and adding
$settings['iframe'] = TRUE;
. I also had to specify a height and width.Comment #5
Neslee Canil Pinto