Connecting data within a lightbox to data from a dynamic page?

Hi there!

I have a data collection for a set of projects. The dynamic pages contain a gallery for each project. There is a button that reveals a lightbox to display more information about each project.

However, I can’t seem to get any of the data within the lightbox to connect to the dynamic page itself . It seems to connect to the first set of data in the collection and ignores the fact that it is on a dynamic page.

Is there any way to resolve this?
Any help is much appreciated!

Are you manually connecting the Lightbox or are you using code?