Showing posts with label youtube. Show all posts
Showing posts with label youtube. Show all posts

Wednesday, 18 June 2014

Making it easier to embed YouTube videos in your web content

We've just made some changes that will make it easier to add YouTube videos to pages in the CMS. You can now add videos to any content type that allows you to insert links, including standard page content, tabbed content, news and events.

To add a video, all you need to do is paste in a link to a YouTube video and assign a class to it of 'youtube-video-embed'. Your published page will then include the embedded video. The screenshots below show the steps in detail.

1. Paste in a link to a YouTube video


2. Use 'Insert/edit link' to set the class of the video to 'youtube-video-embed'


3. Done!

If you preview your page you'll now see your video embedded in your page. It will automatically resize to fill the width of your page.

A page preview showing the embedded video

As an added bonus, if you use this in a column that's too narrow for the embedded video to comfortably fit - for example in a three column layout or in a right hand column - then the video will be replaced with a thumbnail image instead. Clicking the thumbnail will take you to the full size video on YouTube.


A video in a narrow column automatically replaced with a thumbnail image


The old methods of embedding videos will still work. Full details can be found in the Web CMS Guide Wiki.