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

Featherlight gallery within a blog item

Started by Radoslaw 8 years ago · 0 replies · 573 views
8 years ago

I realize this has been asked already a few times, but I also having problems getting the Creating a simple gallery recipe to work in a TwentyFifteen child theme.

My intention is to add a standard Featherlight gallery as a module of a blog item.

My template files:

TXT
TwentyFifteen_Child
- templates
-- modular
--- gallery.html.twig
-- partials
--- blog.html.twig
--- blog.item.html.twig

Gallery.html.twig:

HTML
<ul>
    {% for image in page.media.images %}
    <li>
        <div class="image-surround">
            {{ image.cropResize(300,200).html }}
        </div>
        <div class="image-info">
            <h2>{{ image.meta.title }}</h2>
            <p>{{ image.meta.description }}</p>
        </div>
    </li>
    {% endfor %}
    </ul>

Content files:

TXT
- 02.blog
-- blog item
--- _gallery
---- a.jpg
---- a.jpg.yaml

I think I may be missing something about adding a module to a standard blog item page (thus making it modular), but not sure what?

Does my "_gallery" folder also require a "gallery.md" file? If yes, what should it contain?

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Vladimir Novak, 2 weeks ago
3 292 2 weeks ago
Plugins · by Mathieu Lecouturier, 3 weeks ago
3 277 3 weeks ago
Plugins · by Slebeig, 2 months ago
1 403 2 months ago
Plugins · by Rene, 2 months ago
2 574 2 months ago
Plugins · by Xavier, 3 months ago
2 490 3 months ago