Optional video player on a dynamic page

For a law firm client, we built a site using dynamic pages for the lawyer profiles. Those pages have several elements, most prominently a photo and a text bio. The firm has just asked us to add YouTube video interviews to the pages of two senior lawyers.

I’d like to be sure we’re handling it the best way.

We plan to add two new fields to the ‘lawyer’ collection:

  • a URL field for YouTube video links (for most lawyers, this field will be empty)
  • a boolean field to indicate whether a video link is available

We will add a video player to the dynamic page design, and set its URL to the new URL field in the collection.

In developer mode, we’ll set the video player to ‘collapsed’. We’ll then add some Velo code to look at the new boolean field and, if it is ‘true’, to expand the video player.

Based on documentation, it looks like we could — in the Wix editor — simply use a ‘Rich Content’ field and embed the player in the text of the lawyer’s bio. However, it appears that option isn’t available in Editor X.

Am I missing a better option, or does our approach sound good?

Hey @jim75924 , your solution sounds good.
If you’re putting the video player inside a grid, than make sure it’s on Max-Content so it will collapse if there’s no video.
Let me know if you’re having any trouble with it and need help.

Thanks, @jonathant . I’ve implemented that approach, and it works beautifully.

Resolution Law Firm is full corporate and commercial law firm in *******. The firm ranks among the Law firms in Lagos leading legal consultants in ******* was founded by a group of passionate, hardworking and honest lawyers committed to the excellent delivery of legal services in *******.