@christophstrohfeld It might be simpler to use a single dynamic page design that includes the video player and then collapse / expand the player depending on whether or not a particular record includes a video.
We had a similar requirement recently, and that’s what worked for us.
Before I tried it, I posted about it to see if anyone had a better approach. Here’s my post: https://www.editorxcommunity.com/forum/general-discussions/optional-video-player-on-a-dynamic-page
Below is the Velo code we used (you can ignore the console.log comments – that was just for testing).
It gets the current record (getCurrentItem) in the page’s dataset (named ‘dynamicDataset’) and checks a boolean field (showVideo) to determine whether to make the video player visible (expand). The default status of the video player is ‘collapsed’, so it won’t show unless the code causes it to show.
$w . onReady ( function () {
$w ( ‘#dynamicDataset’ ). onReady (()=>{
if ( $w ( ‘#dynamicDataset’ ). getCurrentItem (). showVideo ) {
$w ( “#videoBox” ). expand ();
console . log ( ‘It should show’ );
} else {
console . log ( ‘It should NOT show’ ) ;
}
})
});