Javascript not loading from footer snippet

hello,

i’m currently testing kirby local and having problems to load javascript files.
I created a new folder ‘js’ inside the assets directory.
Between the closing </footer> and the closing </body> tag i put <?= js('assets/js/guggenheim-photoswipe.min.js'), true ?>
The developers tools from chrome does not show me any javascript under sources…

Welcome to the forum! :slightly_smiling:

The true should be before the closing parenthesis:

<?= js('assets/js/guggenheim-photoswipe.min.js', true) ?>

But that shouldn’t be the reason why it doesn’t work.

Have you actually created that file? If you want to use the file the Guggenheim plugin provides, it has to be like in its readme.

Yes, it is from the Guggenheim Plugin. It is a modified version from Jimmy himself.
I believe this is not related to Guggenheim but rather a mistake i did and cannot figure out… because javascript files are infact loading from the head section as developer tools is showing me!

What does your source view in the developer tools look like? Especially the part where the script tag should be.

hey, i found the error inside my footer:

deleting this line which echos a nonexisting site caused the javascript not to be echoed …
<a href="<?php echo $site->page('impressum')->url() ?>"><?php echo $site->page('impressum')->title() ?></a>

thanks lukas, for making me look closer :slightly_smiling:

1 Like

I’m happy to see, you got it working :smile: