I've set up a store but didn't like the default slug (product page) so edited this and started fresh. I can get all the info to link except the images in the 'Media Items' column won't show on a Pro Gallery. Am I doing something wrong?
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
The pro gallery is nothing more than an Array of objects that have a similar setup of these elements. That's why I created a Custom Object of it myself.
function GalleryItem() { this.type = "image", this.slug = "", this.title = "", this.description = "", this.src = ""; this.link = ""; }
Having this said. Your Media Items is not one Image but an Array of Images.
So, with a simple forEach you can loop through these Images and create a GalleryItem that you put into an Array itemList
let itemList = []; ... //begin your forEach loop let galleryItem = new GalleryItem(); ... //set the items src is the image url itemList.push(galleryItem); //end loop
Having this Array allows you to populate your gallery
$w("#gallery1").items = itemList;