Drupal Lite: Add a YouTube Custom Block to a Page

This article applies to Drupal Lite and Drupal Enterprise.

A YouTube video can be added to a page using a custom block. The embedded video will be the width of the region it is in and the height will scale appropriately.

Table of Content

Embedding a YouTube Video

Finding the YouTube video share link

  1. View the video on YouTube
  2. Select the Share button in the toolbar just below the video
  3. Select the Copy button next to the URL
    • If you want the video to start at a certain timecode, select the Start At box and enter the time where the video should start playing.

Adding the YouTube video to the Media Files

  1. Select Content in the administrative toolbar.
  2. Select the Media tab.
  3. Select the Add Media button.
  4. Select Remote Video.
  5. Enter a Name
  6. Paste the YouTube URL that was copied in the instructions above
  7. Select Save.

The video can be embedded into a field that has the wsiwyg (what you see is what you get) toolbar, or it can be added using a Custom Block.

Adding the YouTube Remote Video using the Insert Media button using an existing field

  1. Locate the page and select Edit.
  2. Select the Insert Media button in the toolbar.
    Toolbar with insert media icon highlighted
  3. Select Remote Video in the left navigation tabs.
  4. Select the video that was added using the instructions above.
  5. Select the Insert Checked button.

Adding the YouTube Remote Video using a Custom Block

  1. Log in to the site
  2. Find the page to add the video
  3. Select Layout
  4. Select Add Block in the region where the video will be placed. The Choose a Block palette is displayed.
  5. Select Create Content Block at the top of the palette. Then add a New Custom Block palette.
  6. Select Text. The Configure Block palette is displayed.
  7. Enter a Title
  8. Deselect the Display Title checkbox if you do not want the title displayed.
  9. Use the instructions below to add the Remote Video.
  10. Select the Insert Media button in the toolbar.
    Toolbar with insert media icon highlighted
  11. In the left navigation tabs, select Remote Video.
    A text box to add a remote video link from YouTube or Vimeo and a red Add button. A list of Media options are on the left: Image, Audio file, Document, Instagram, Remote video, Tweet, and Video file.
  12. Copy and Paste the URL of the video into the Add Remote video via URL field.
  13. Select Add, then click Save and Insert Button
    Save and Insert
  14. Select Add Block. The palette closes and the Layout Builder is displayed.
  15. Select Save Layout at the top of the page

Last modified

Changed

TDX ID

TDX ID
5756