Morning, everybody…
I’m having a problem with two codes on a dynamic page, I don’t know if I should link them…
I want my image gallery (galleryFictionLogo) and/or a button (Visionner le traler) collapse if the database is empty…
if I put one code it works, but if I put both, I have nothing left… Since I’m new to code, can someone tell me what I did wrong?
Thank you very much.
$w.onReady(() => {
$w( “#dynamicDatasetFICTION” ).onReady(() => {
const item = $w( “#dynamicDatasetFICTION” ).getCurrentItem();
if (!item.logoFestival) {
$w( “#galleryFictionLogo” ).collapse();
} }); });
$w.onReady(() => {
$w( “#dynamicDatasetFICTION” ).onReady(() => {
const item = $w( “#dynamicDatasetFICTION” ).getCurrentItem();
if (!item.LienFiction) {
$w( “#buttonTRAILER” ).collapse();
} }); });