Basil Posted August 9, 2014 Posted August 9, 2014 hi to all proceswire!! i have a dificult time to add cloud-zoom http://www.starplugins.com/cloudzoom the code is like this: i change my post i find a easy way here is the code <div class="images"> <ul class="additional-images"> <?php foreach($page->images as $img){ ?> <li> <a href="<?php echo $img->url; ?>" title="Some fancy title" class='cloud-zoom-gallery zoom' rel="useZoom: 'zoom1', smallImage: '<?php echo $img->url; ?>' "> <img src="<?php echo $img->url; ?>" title="Some fancy title" alt="Some fancy title" /> </a> </li> <?php } ?> </ul> <div class="image"> <a href="<?php echo $img->url; ?>" class="cloud-zoom" id="zoom1" rel="position: 'inside' , showTitle: false, adjustX:-4, adjustY:-4"><img src="<?php echo $img->url; ?>" title="Awesome products name" alt="Awesome products name" /> </a> </div> </div> is working fine this way but the problem is that i want to display additional images div under image div <div class="images"> <div class="image"> <a href="<?php echo $img->url; ?>" class="cloud-zoom" id="zoom1" rel="position: 'inside' , showTitle: false, adjustX:-4, adjustY:-4"><img src="<?php echo $img->url; ?>" title="Awesome products name" alt="Awesome products name" /> </a> </div> <ul class="additional-images"> <?php foreach($page->images as $img){ ?> <li> <a href="<?php echo $img->url; ?>" title="Some fancy title" class='cloud-zoom-gallery zoom' rel="useZoom: 'zoom1', smallImage: '<?php echo $img->url; ?>' "> <img src="<?php echo $img->url; ?>" title="Some fancy title" alt="Some fancy title" /> </a> </li> <?php } ?> </ul> </div> like this if i dont click to additional image link it doesnot display the main image. thank you!
LostKobrakai Posted August 10, 2014 Posted August 10, 2014 Which values does "$img" hold? There's nothing pointing to a processwire image-field, at least in your posted part of the code.
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