Hi Everyone…hoping for some help. I posted this first here: https://www.wix.com/code/home/forum/questions-answers/database-and-dynamic-product-page, but I am unsure how to know if it will be seen there, so forgive the duplication…
I am trying to achieve a similar result and having some difficulty.
my site: salutetovienna.com
my sample page: salutetovienna.com/2019/boston & salutetovienna.com/2019/calgary (gallery in question is below “Thank You” at the bottom of the page)
I have 25 cities, each with a different number of sponsor images. I was hoping to have them cycle near the bottom of the page. Both of the options above make sense to me but having tried the first and not getting it to work, I think I need some help:
Here is my page code (all of it, in case that helps):
// For full API documentation, including code examples, visit http://wix.to/94BuAAs
$w.onReady(function () {
//TODO: write your page related code here…
});$w.onReady(() => {
$w(‘#2019 dataset’).onReady(() => {
let item = $w(‘#2019 dataset’).getCurrentItem();
$w(‘#gallery3’).items = [
{src: item.spon1},
{src: item.spon2},
{src: item.spon3},
{src: item.spon4},
{src: item.spon5},
{src: item.spon6},
{src: item.spon7}
];
});
});
The assistant code builder suggested I add semicolons after the last two lines of text.
It also did not like any other version than lowercase “gallery3” and database name “2019 dataset” (also lowercase)… I do notice when I connect the database to other items that it is referred to as “2019 Item”; perhaps that is an issue (it was not accepted as a dataset name)?
At the moment, I only have 7 image placeholders within the dataset but only boston and calgary rows have any images placed within them.
I connected “gallery3” to the dataset 2019 but not to spon1 image and then disconnected it… I am not sure if the gallery is supposed to be actively connected to the dataset for this to work. Neither option seemed to make a difference.
I have synced my dataset to live, and published the site, but nothing seems to be populating the gallery.
Any help would be greatly appreciated. Please note that I have blank/white placeholder jpgs on the gallery/carousel & the Boston page is currently in use.
Stephanie