I I seem to be having the same problem started about 2.5 hrs ago. The gallery has been working fine for 18 months with no changes to the code β¦ then it just stopped. Has anything changed?
Hereβs the code, β¦ I got from the forums β¦ yes itβs a bit crude but I donβt do this for a living β¦ it works β¦ well it use to.
import wixData from βwix-dataβ;
$w.onReady( function () {
let pic1 = $w(β#dynamicDatasetβ).getCurrentItem().pic1;
let pic2 = $w(β#dynamicDatasetβ).getCurrentItem().pic2;
let pic3 = $w(β#dynamicDatasetβ).getCurrentItem().pic3;
let pic4 = $w(β#dynamicDatasetβ).getCurrentItem().pic4;
let pic5 = $w(β#dynamicDatasetβ).getCurrentItem().pic5;
let pic6 = $w(β#dynamicDatasetβ).getCurrentItem().pic6;
let pic7 = $w(β#dynamicDatasetβ).getCurrentItem().pic7;
let pic8 = $w(β#dynamicDatasetβ).getCurrentItem().pic8;
let pic9 = $w(β#dynamicDatasetβ).getCurrentItem().pic9;
let pic10 = $w(β#dynamicDatasetβ).getCurrentItem().pic10;
let pic11 = $w(β#dynamicDatasetβ).getCurrentItem().pic11;
let pic12 = $w(β#dynamicDatasetβ).getCurrentItem().pic12;
let pic13 = $w(β#dynamicDatasetβ).getCurrentItem().pic13;
let pic14 = $w(β#dynamicDatasetβ).getCurrentItem().pic14;
let pic15 = $w(β#dynamicDatasetβ).getCurrentItem().pic15;
let pic16 = $w(β#dynamicDatasetβ).getCurrentItem().pic16;
let pic17 = $w(β#dynamicDatasetβ).getCurrentItem().pic17;
let pic18 = $w(β#dynamicDatasetβ).getCurrentItem().pic18;
let pic19 = $w(β#dynamicDatasetβ).getCurrentItem().pic19;
let pic20 = $w(β#dynamicDatasetβ).getCurrentItem().pic20;
$w(β#gallery1β).items = [ { src: pic1, }, { src: pic2, }, { src: pic3, }, { src: pic4, }, { src: pic5, }, { src: pic6, }, { src: pic7, }, { src: pic8, }, { src: pic9, }, { src: pic10, }, { src: pic11, }, { src: pic12, }, { src: pic13, }, { src: pic14, }, { src: pic15, }, { src: pic16, }, { src: pic17, }, { src: pic18, }, { src: pic19, }, { src: pic20, }];
});
$w.onReady(() => {
$w(β#dynamicDatasetβ).onReady(() => {
let items = $w(β#dynamicDatasetβ).getCurrentItem().morePics;
if (items === yes
) {
$w(β#button13β).show();
} else {
$w(β#button13β).hide();
}
});
});