Closed citrik closed 7 years ago
Hi, Could you try to disable twig caching for the page with the gallery. Adding never_cache_twig: true to the frontmatter should do the trick.
There is currently an issue with assets added by my twig function not ending up in cache. I'm looking for solution.
So the full content of my gallery.md file is
---
never_cache_twig: true
---
And the full content of my gallery.html.twig file is
<div class="modular-row gallery-container {{ page.header.class }}">
{{ unite_gallery(page.media.images) }}
</div>
Is that correct? Do I need to add the "never_cache_twig: true" somewhere else? Thanks!
This looks ok if gallery.md is part of modular page. You may add cache_enabled: false to disable all caching for that page just to check if that works.
Looked through shrotcodes core plugin and got an idea how assets can be added even with enabled caching using page content metadata. Will try to implement it tomorrow.
I had the same problem, the assets were not loading. I solved the problem by installing the Assets plugin.
The functionality provided by this Assets plugin is definitely not required by Unitegallery plugin. However, processing that Assets plugin does for each page might trigger something that helps to load assets. I'll look into its code.
I've implemented new way to add js and css assets with caching enabled. @citrik could you please check if it works for you?
I'm getting an error with my Grav install using Unite Gallery.
Line 93 of my index.html is where the gallery is being called (Starting from line 91)
Looking in the earlier stages of the index.html I can see jQuery is being sourced, but I don't see that for the unitegallery.min.js (Starting from line 22)
Looking at unitegallery_extension.php it seems like it might be an issue around line 63 / 80 / 85 which is where the unitegallery.min.js should be added to the grav['assets'] but nothing is standing out to me as an issue. Could this be caused by me having an incorrect configuration of the plugin? I'd appreciate any advice as the gallery looks really nice and It'd be great to get it up and running with Grav. -Thanks!-