Try our conversational search powered by Generative AI!

How to add a video in a content area


I want to allow a video as an item in my content area.

Please let me know the process of how a video can be added into it

Sep 24, 2020 14:49

Hi Tanvi,

You can allow video items on ContentArea by the below code and then write logic on the view to render it.

[AllowedTypes(AllowedTypes = new [] { typeof(VideoData) })]
public virtual ContentArea RelatedContentArea { get; set; }

But I suggest you create a new block type called VideoBlock and then create its own controller/view and then it will work as a normal block.

Sep 25, 2020 4:28

We can add an Iframe in the view and in its src property we can add the embedded url available from the video

Oct 09, 2020 7:02
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.