Thanks @texnixe for your help, but that just broke it… When I add that code instead, it is not showing any images whatsoever.
My latest approach has been trying the first of my approaches mentioned in my original question: listing the images inline per gallery. Whenever I called the gallery tag within the panel text, though, it produced every image in the page’s sidebar. I found this suggestion to split them:
$images = explode(",", $tag->attr('image_gallery'));
as described here:
https://forum.getkirby.com/t/kirbytext-inline-gallery/510/7
If I only try to call the names of images, this works to pull just the images that were actually mentioned in the tag! However, I can’t figure out how to get it to to show the images themselves! I tried I have tried adding ->toFile()
to either place that $slide
appears, but both changes resulted in nothing showing from the fields that the gallery tags were called.
Here is my full code with (without ->toFile()
anywhere since it was breaking things):