solido Posted December 1, 2015 Share Posted December 1, 2015 Hi everybody, I'll try to explain my problem. I have a portfolio section with some preview (as you can see in the pictures attached below) and when i click one of these preview I enter in a popup page, created with magicpopup js. What i would like is to have a slide show for every project. This is my code: <div class="row"> <div class="col-lg-6 col-md-6"> <div class="cycle-slideshow"> <?php if(isset($page->slideshow) && $page->slideshow->count() > 0):?> <?php foreach ($page->slideshow as $image): ?> <img src="<?php echo $image->url;?>" alt="" class="project-image"> <?php endforeach ;?> <?php endif;?> </div> </div> ........ Where I did wrong? At PW level I use a "Portfolio page" that contains 1 page for every project and in each page I use a "slideshow" field (which has image type). In this field I upload my images. Thanks in advance Link to comment Share on other sites More sharing options...
kongondo Posted December 1, 2015 Share Posted December 1, 2015 Try removing the isset condition... <?php if($page->slideshow->count()):?>// or below if this doesn't work.. // <?php if(count($page->slideshow)):?> 2 Link to comment Share on other sites More sharing options...
solido Posted December 1, 2015 Author Share Posted December 1, 2015 Try removing the isset condition... <?php if($page->slideshow->count()):?>// or below if this doesn't work.. // <?php if(count($page->slideshow)):?> You are great! I spent 3 hours on this stupid problem! You saved me! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now