How do I get titles to appear for the videos in the video gallery?
I have a video gallery displayed. I cannot figure out how to get their titles to appear with the individual videos. I have tried adding title info in the DESCRIPTION section of the video, but it does not appear when I publish.
Is there a way to get the video titles to appear in the video gallery? I figure there must be cause people won't know what video to select just based on the thumbnail picture. I can't figure out how to do it. I am using Sitefinity 6.0.
I realized I have a second question about using the video gallery. If I put a single video in a video widget I can control the width, height, and location on the page. When I use a video gallery and then launch a video from the gallery, I don't seem to be able to control the width, height and page location. How do I accomplish that?
Thanks!
Kevin
Hello Kevin,
Thank you for using Sitefinity!
You can edit the widget template that is used to display videos. Navigate to Design > Widget Templates and create a new template or edit the one your widget uses. Our default template for displaying list of videos is List of video thumbnails. In order to display Title, you have to add following line of code inside ItemTemplate section:
<sitefinity:TextField runat="server" DisplayMode="Read" Value='<%# Eval("Title")%>' />
Regarding your second question, you can also try to edit the widget template used to visualize a single video item. Our default one is called Single video with details.
Miroslava,
Thanks very much for this. It works well. However now that I am displaying the title with the video, the thumbnails are stacked vertically. They lay out horizontally without the titles. Is there a way to keep both the titles and the horizontal layout?
Thanks
Kevin
Hi Kevin,
Thank you for getting back to us.
Here is a sample code snippet, showing how the widget item template must look like:
<
ItemTemplate
>
<
li
class
=
"sfvideoTmb"
>
<
sf:DetailsViewHyperLink
ToolTipDataField
=
"Description"
ID
=
"singleItemLink"
runat
=
"server"
/>
<
sitefinity:TextField
runat
=
"server"
DisplayMode
=
"Read"
Value='<%# Eval("Title")%>' />
</
li
>
</
ItemTemplate
>
style="display:inline-block"
Vasya,
Thanks for this. It works great. I was able to get them displayed and evenly spaced horizontally. Of course I now have another question. Although the videos are evenly spaced, the video thumbnails are different heights, so the thumbnails are not uniform in appearance.
I don't know how to change that. Is there a way to adjust the size of video thumbnails? I can change the size of a single video when it's displayed, but don't know how to edit the thumbnail size. If not would it work to put each video in a container and upload the videos like that so that all the video thumbnails in the video gallery appear the same size?
Thanks!
Kevin