Hi friends,
I have a Wix Pro Gallery on my site, connected to a Dataset that has fields for the Title, Description, Photo, and Text for a Link to Lightbox.
Currently, I’m using the following code:
import wixData from 'wix-data';
import wixWindow from 'wix-window';
$w.onReady( function() {
$w("#Cast").onReady( () => {
$w("#CastGallery").onItemReady( ($item, itemData, index) => {
$item("#CastGallery").text = itemData.role.toUpperCase();
})
})
})
And what I’m attempting to do is force the description of the Wix Pro Gallery to be uppercase with no success.
Also, I’d like to use a text field with the title of a lightbox to connect to the lightbox itself for the links of the Title, Description & Photo — as we commonly do for repeaters. For that, I’m using the following code:
import wixData from 'wix-data';
import wixWindow from 'wix-window';
$w.onReady(function () {
wixData.query("Cast")
.find()
.then((results) => {
$w(`#CastGallery`).data = results.items;
})
.catch((err) => {
let errorMsg = err;
});
$w(`#CastGallery`).onItemReady(($w, itemData) => {
console.log(itemData);
$w(`#CastGallery`).label = itemData.name;
$w(`#CastGallery`).onClick((event)=>{
wixWindow.openLightbox(itemData.lightbox);
});
$w(`#CastGallery`).onClick((event)=>{
wixWindow.openLightbox(itemData.lightbox);
});
});
});
The link to my website is:
https://www.regularsmusical.com/cast-workshop
Can anyone help! Thanks in advance.
Warmly,
Miss Hazel