Closed samokish-ivan closed 1 year ago
I think i see the problem.. Typically a theme has a 2 places you can add js, the top/head which is default, and the bottom. The lightbox gallery addAssets()
method is specifically specifying bottom
for the location, and the Coder theme doesn't have this available.
Simplest solution is to add an extra line in the grav-coder/templates/partials/base.html.twig
file, after this:
{{ assets.js() | raw }}
so you have:
{{ assets.js() | raw }}
{{ assets.js('bottom') | raw }}
Then it should work fine.
This worked! Thank you!
I tried almost everything to get this to work, but for some reason, even though my gallery displays here on this page: https://samokish.ca/photography the lightbox does not activate. I am using the Grav Coder theme.
I checked and the js script is not being used. I'm totally new to Grav and Twig templates. I have no clue what I'm missing here. Any insight on this would be appreciated.
I used the same code as provided in the documentation, with a modification posted here where images are all pulled in from the media automatically. Here is the complete code for the page reference above: