Multiple images attribute to display a slideshow with thumbnails
PermalinkI can get the file paths to display the paths using....
<?php $page = Page::getCurrentPage(); $images = $page->getAttribute('property_images'); $getFiles = MultipleFilesAttributeTypeController::getFiles($images); foreach($getFiles as $file){ echo $file->getVersion()->getRelativePath(); }?>
I ultimately need to display these images in a slideshow with thumbnails under it. Trying to use FlexSlider. Any help would be awesome! BTW I am using 5.6.2.1
Thank you.
I need to try and create thumbnails as well. But mostly need the slideshow to work.
It won't create the slideshow on its own, it still needs the FlexSlider JavaScript call.
http://flexslider.woothemes.com/...
Example from the FlexSlider site:
- what the HTML should look like
<!-- Place somewhere in the <body> of your page --> <div class="flexslider"> <ul class="slides"> <li> <img src="slide1.jpg" /> </li> <li> <img src="slide2.jpg" /> </li> <li> <img src="slide3.jpg" /> </li> <li> <img src="slide4.jpg" /> </li>
- the JavaScript
// Can also be used with $(document).ready() $(window).load(function() { $('.flexslider').flexslider({ animation: "slide" }); });
I don't have any experience with 5.6 and am not sure what is returned from getFiles(), but you said you were getting the file paths to the images to display. The image path can then be used as the img src and the opening and closing li can be added. The rest is the example HTML.
How many image attributes are you using?
You said the li tags show up without images. Did you inspect the img src inside them to see what was being added?
Is the FlexSlider script file linked to and loaded in your page?
<?php Loader::element('footer_required'); ?>
Have you checked to make sure jQuery and FlexSlider are both loaded?
What does your script look like to call .flexslider()?
****I figured out the thumbnails!
Thanks for all of your help! I will post all my code later for others to reference.
You could give this a try:
http://flexslider.woothemes.com/...