Answer the question
In order to leave comments, you need to log in
How to display video in news?
In the visual editor, there is only the addition of a video - a video from YouTube, Vimeo, and if the video is located on the site or in the media library, there are only snippets on the right, how to add a video to the news?
Answer the question
In order to leave comments, you need to log in
If the news item is an infoblock element and the video should always be displayed in the same place in the template, then you can do the following:
- Create a IB property of the video type.
- Enable the display of this property in the component settings. Most likely it will be a complex bitrix:news component, in the template of which bitrix:news.detail is included.
- in the template of the corresponding component, display the video either using the string formed in $arResult["DISPLAY_PROPERTIES"], or by inserting the path to the file with the video in the html tag video
ps In the comments to the question, you showed where you add the PHP code. So, it cannot be added to the description of the IB element. It will not be fulfilled there. Only html is allowed there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question