Display image from Repeater to Lightbox

Hi eMG! Here is my simple code. I made a simpler lightbox that shows only one image and text to demonstrate.

(1) On the Dynamic category page: Code and screen shot (modified to show links):

import wixWindow from ‘wix-window’;
import wixData from ‘wix-data’;

export function image4_click(event, $w) {
wixWindow.openLightbox(‘Dorsal_Photo’, $w(‘#dynamicDataset’).getCurrentItem());
}

(2) Lightbox code and screen shot modified to show links to lightbox and database:

import {lightbox} from ‘wix-window’;

$w.onReady( () => {
let item = lightbox.getContext();
$w(“#Dorsal”).src = item.dorsal;
$w(“#Sciname”).text = item.sciname;

});

Hope this helps. Good luck!

Leana