Slideshow Images

I have a slideshow that displays images from a dymamic folder. How can I display images from a default folder if the main folder has no images in it?

If there is only 1 image in the folder, can I remove the arrows from the slideshow. Right now, the arrows appear even if there is no image in the folder.

Thanks,
Tom

I have had the same issue with arrows showing for only a single image, that is something I manually altered with css and dynamic classes, I actually have not had another situation where i needed that so have not checked the later Wappler versions to see if it was accounted for of not, assuming by your question that it hasn’t.

I think your better bet would be to switch to using the swiper component over the slideshow component as you get better control of a couple things.

As far as the default folder this should be pretty simple to achieve in a few different ways, could you please give more detail.

  1. Please give a screenshot of your server action that looks for the folders to get the images.
  2. Please show how you are using the data returned from the server action, a standard repeat region / repeat children, or a data view component, etc.

Once I have the extra info I will try to assist.

	<dmx-slideshow id="slideshow1" show-nav show-paging pause-on-hover dmx-bind:slides="get_photos.data.getPhotos" slide-url="path" delay="120" no-autostart style="">

I have a folder with default images at /photos/default_images

Basically, if the folder in empty that uses the ad_id, I want it to use the images in the default folder.

There are a number of ways you could do this.

Add a condition step after your FolderList with the condition set to {{getPhotos < 1}} and duplicate your FolderList and drag the copy into the then > steps area.
Rename the copy to be identical to the main Folder List of getPhotos by removing copy which was appended to the name. Set the path to your default folder and save.
Screenshot 2020-06-07 at 20.00.16

Now when the main folder list sees less than 1 picture, which can only be 0 pictures then it will run the condition, because the names are the same it will supercede the empty data in the first folder list.

There are other ways to do this with .default formatters on your G_GET.ad_id

Lets say your ad_id is 30 and you set up a default set of pictures in ad_id 0, you could do this.
/photos/{{$_GET.ad_id.default("defaultfolder")}} but doing this would mean your actual ad_id would have to have no value at all for it to use the default

So it is probably safest to use the condition rather. It just depends on how your particular setup and system works to figure out which could be better for your use case.