Hi i currently used the code for dynamic gallery (on my dynamic item page). the code working partially and i have problem about this.
$w.onReady(function imatDataset_onReady() {
let item =$w(’ #imatDataset ‘).getCurrentItem(); $w(’ #imatgallery ').items = [
{src: item.s1},
{src: item.s2},
{src: item.s3},
];
});
for example - >> i want to display in the gallery max. 3 images for each item but not Necessarily/Always 3. So is there a solution for this?
because In some case item has only 2 or 1 image. but when in the database are lass images than 3 for any item > gallery shows blank (empty) images boxes — and message in console on preview → " Wix code SDK Warning: The src parameter of item at index 1 that is passed to the items method cannot be set to null or undefined." (see screen) ________ thanks for all in advance ________
thanks