video player should be on certain items not everywhere and the velo code to hide the non url ones does not work
Briefly explain what’s not working or where you’re stuck
Working in
e.g. Wix Studio Editor, Wix Editor, Dev Mode, CMS, etc.
Site link
www.jacquelinevandegeer.ca
trying to be able to add a video to some of the items of a dynamic page without that video being mirrored i every item
What I’ve tried so far
i tired to paste the code for hiding the videos absent in the url field of the dynamic page
Extra context this is what I pasted following the suggestion in the “Hiding a video player when there is no video player” velo tutorial
$w.onReady(() => {
$w(“#myDataset”).onReady(() => {
// Gets the current item properties and stores them in a variable called item
const item = $w(“#myDataset”).getCurrentItem();
// Checks if the current item has a value in the “video” field
if (!item.video) {
// Collapses the video player if there is no value for “video”
$w(“#videoPlayer”).collapse();
}
});
});