Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Lightslider images folder

Started by Muut Archive 9 years ago · 3 replies · 661 views
9 years ago

Hi and happy new year to all of you.
I want to use the image slider plugin with page specific sliders.
I got it working like in the "shop site skeleton" with the slider folder put in .../user/pages/. Now I want to edit my blog_item.html.twig to use a folder inside specific page (for example: .../user/pages/02.blog/03.my_blog_post).
How do I have to modify this line:

TWIG

{% include 'modular/lightslider.html.twig' ignore missing with {'page': page.find('/slider', true)} %}
---
9 years ago

I'm progressing in my research. For now I can acces to a slider like this:

TWIG
    {% include 'modular/lightslider.html.twig' ignore missing with {'page': page.find('/projects/projectA/slider', true)} %}

where the tree looks like .../user/pages/01.projects/projectA/slider and 01.projects page is defined as home page in grav admin configuration page.
So, technicaly it works, but it is some static :(
I want to find a way to ask grav to use a path relative to projectA/slider folder (and then projectB/slider, projectC/slider, ...)

any ideas?

9 years ago

I'm working on a simpler OwlCarousel plugin that is built on shortcodes. I've not had chance to revisit lightslider lately. I think I will redo it with shortcodes also.

9 years ago

Thank you for your reply. I'll stay tuned.
I think I'll go with modular pages for the moment.
regards

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1346 9 years ago
Archive · by Muut Archive, 9 years ago
2 933 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2945 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago