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.
Firstly, is $media_gallery_item always the correct variable for the lightbox thumbnail?
Secondly, What is the proper way to make that variable available for use in node templates (without breaking the lightbox gallery function)?
Thank you for your helpful solution!
Comments
Comment #1
Thundermoth CreditAttribution: Thundermoth commentedI want to isolate the single block thumbnail image ($media_gallery_item used in media_gallery_media_item_thumbnail.tpl.php) and insert it directly into a new node template (node--media-gallery.tpl.php)so that I can float the image in the body field (and preserve the lightbox trigger).
Is template_preprocess the correct preprocessor to use? If so, since my template name is node--media-gallery.tpl.php, would my function be template_preprocess_node__media_gallery(&$variables)?
Comment #2
ivnish CreditAttribution: ivnish commented