Menu icon Foundation
Karl Ward almost 6 years ago

I think you would need to interchange sections of html, as the interchange script only handles img tags and not links. Personally, I built my own JS script to manage the src for lightbox links across multiple screen sizes and pixel-ratios.

Jeremy Doyle almost 6 years ago

Karl, thanks for the guidance. Writing my own javascript solution is a bit outside of my level of expertise. Like you suggested, creating three chunks of lightbox HTML (small, medium, and large), saving each of them out into their own files, and using Interchange to load the code based on screen size sounds like it should be a workable solution. However, I eventually want to be able to create multiple sites using this code so I want to create the lightbox HTML dynamically with PHP; I planned on creating the list elements with a foreach loop. Do you know if I can sub PHP files for HTML files? Thanks.

Karl Ward almost 6 years ago

Sub PHP files for HTML files? You should be able to load both html and php with interchange, as long as the output is html ...

I made a request that they add support for links in interchange, as it would be pretty similar to how it works for img. I think they just ignored the request though https://github.com/zurb/foundation/issues/3833 ...

Jeremy Doyle almost 6 years ago

Karl, I saw your post on Git before writing my post to this forum. I remember thinking it was BS that your request was closed so fast with little consideration to what you were suggesting. It certainly would make life much easier if the interchange of links to images were supported. Anyways, for now, I think you've helped me come with a suitable work around. Thanks for the help!

Rob Kennard almost 5 years ago

Ive written a php function that generates the necessary html fragments, then inserts it into the page if anyone is interested?