This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Hessel
Hessel

I use the IsoGallery plugin and modified it to my needs. Normally the slider popup appears when you click on an item, but now i created a slug and if you click on an item a new page appears with details about that item. so far so good.

But now I would like all the images attached to that particulair item to appear in a slideshow. this is what goes wrong:

It doesn't matter which item I click. The slug page always displays the images (exept the first one) from the item I created first. So if I click the second item, the images from item 1 appear again.

I would like to display the images from the items they belong to in the slider.

here is my code :

 {% set project = __SELF__.project %}

<!-- Content -->
<div class="container">

    <div class="row">
        <div class="col-md-12">
            <div class="simple-slider">
                <ul class="slides">

                        {% for gallery in galleries %} 
                        {% for photo in gallery.photos %}
                            {%if loop.index != 1%}

                                <li><img src="{{photo.path}}"></li>  
                            {%endif%}
                        {% endfor %}
                    {% endfor %}
                </ul>

            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12">
            <div class="project-details margin-top-35">
                <h4 class="headline with-border">{{ project.title }}</h4>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-8">
            Datum {{ project.created_at }}
            <p>Maecenas molestie fermentum luctus. Cras lacinia molestie nibh. Pellentesque non magna ac dui varius auctor at sed nunc. Fusce bibendum eros sed mattis accumsan. Nam mattis convallis elit, ut condimentum nulla commodo nec. Aenean eget metus sed turpis molestie porta vitae non libero.</p>
            <p>Maecenas vehicula ultrices magna, vitae placerat nibh rhoncus sit amet. Vestibulum congue suscipit sagittis. Phasellus at dui eget metus consectetur laoreet id ac mi. Proin nisl mi, gravida sed maximus ut, sodales dictum velit. Nunc ultricies porttitor est, ut rutrum ante. Vivamus interdum sodales sem. In ultrices augue eget nibh convallis, quis laoreet tortor lacinia. </p>
        </div>

        <div class="col-md-4">
            <ul class="details alt">
                <li><span>Date:</span> {{ project.created_at }}</li>
                <li><span>Location:</span> London</li>
                <li><span>Category:</span> <a href="#">Kitchens</a>, <a href="#">Carpentry</a></li>
            </ul>

            <ul class="project-nav">
                <li><a href="#" class="button border"><i class="fa fa-long-arrow-left"></i> Previous</a></li>
                <li><a href="#" class="button border">Next <i class="fa fa-long-arrow-right"></i></a></li>
            </ul>
        </div>
    </div>

</div>
Hessel
Hessel

I'm willing to pay 20 dollar for the solution, anyone?

Eoler
Eoler

Hessel said: I use the IsoGallery plugin and modified it to my needs. (...) It doesn't matter which item I click. The slug page always displays the images (exept the first one) from the item I created first. So if I click the second item, the images from item 1 appear again.

I guess it depends on how you linked your models (project -> gallery), we need to see PHP code not Twig partial...

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.