getgrav / grav-plugin-shortcode-owl-carousel

Grav Shortcode Owl Carousel Plugin
https://getgrav.org
MIT License
11 stars 12 forks source link

Not working in modular page #17

Closed jza34 closed 5 years ago

jza34 commented 5 years ago

Thanks developpers for having fixed assets loading in modular pages #16 , it works! But now, in a modular page, the carousel is hidden even if JS and CSS are loaded fine. The carousel still works fine in regular page.

Grav v1.6.9 PHP-FPM v7.3.4 Shortcode Core v4.1.1 Shortcode Owl Carousel v1.0.2

rhukster commented 5 years ago

Do you have a URL as an example?

withindale commented 5 years ago

Similar issue using Supra.

[owl-carousel]
![](XLS01.jpg)
![](XLS02.jpg)
[/owl-carousel]
![](XLS01.jpg)
![](XLS02.jpg)

displays following, with images below:

<img alt="" src="/grav-en/user/pages/02.labelling/11.applicators/08.novexx-xls/XLS01.jpg" /> 
<img alt="" src="/grav-en/user/pages/02.labelling/11.applicators/08.novexx-xls/XLS02.jpg" /> 
<img alt="" src="/grav-en/user/pages/02.labelling/11.applicators/08.novexx-xls/XLS03.jpg" />

URL: https://www.codeway.biz/grav-en/labelling/applicators/novexx-xls

jza34 commented 5 years ago

Here it is not working (should be displayed at the top, below the menu) in homepage : http://grav-dev.amatiq.fr/www.domainelapeyriere.fr But works fine (at the bottom of the page above the footer) in a regular page : http://grav-dev.amatiq.fr/www.domainelapeyriere.fr/le-domaine

Same markdown code for both. This website is under a Multisite configuration (directory based not domain based)

rhukster commented 5 years ago

I see everything but the inlineJS that is needed to initialize OwlCarousel. Are you running the latest versions of Grav + Shortcode-Core ???

jza34 commented 5 years ago

You are right about what is missing, see below the version I use :

Grav v1.6.9 PHP-FPM v7.3.4 Shortcode Core v4.1.1 Shortcode Owl Carousel v1.0.2

jza34 commented 5 years ago

Sorry I closed the issue by misclicking... so I re-opened it immediately.

rhukster commented 5 years ago

I think your problem is related to your theme not having the correct Assets structure in the <head>. Please refer to this: https://getgrav.org/blog/important-theme-updates for the correct structure.

jza34 commented 5 years ago

Thanks! You are right I have followed the guideline you provided and it works. Modifying the <head> section of my base template, assets are now called with:

{% block assets deferred %}
    {{ assets.css()|raw }}
    {{ assets.js()|raw }}
{% endblock %}

For me you can close this issue, thank you.

withindale commented 5 years ago

Thank you. Will check when back from a trip.

On Tue, 28 May 2019, 05:11 Andy Miller, notifications@github.com wrote:

Closed #17 https://github.com/getgrav/grav-plugin-shortcode-owl-carousel/issues/17.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/getgrav/grav-plugin-shortcode-owl-carousel/issues/17?email_source=notifications&email_token=AEBZD4PZ2AYK4Z7OLHMR36LPXQ57HA5CNFSM4HPQBJ3KYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGORVCPAFA#event-2370105364, or mute the thread https://github.com/notifications/unsubscribe-auth/AEBZD4N5XPZKSIHFYE6OZYLPXQ57HANCNFSM4HPQBJ3A .

Sogl commented 4 years ago

I have right <head> structure, but assets not load and carousel doesn't work (