Add a YouTube video to your template.

You can add YouTube videos to your template. The videos can be later customised within the Editor.


Basic usage

To include a video in your template you will need to add the following line:

{{widget('youtube', 'video', {})|raw}}

Example usage

{{widget('youtube', 'video', {
  'videoId': '...',
  'userInput': '<iframe src="..." allowfullscreen></iframe>'

Resulting HTML:

<div id="page-zones__template-widgets__video" data-name="youtube" class="widget  widget--template-widget">
  <div class="bk-youtube  youtube  widget__youtube">
    <div class="embed-wrap  embed-wrap--video  youtube__embed-wrap">
      <iframe class="iframe  iframe--video  youtube__iframe" width='100' height='215' src=""></iframe>

Widget options

You can change the following options for the widget:

  • videoId: The video ID. i.e., in all of the examples below the ID is j9Hjrs6WQ8M

  • userInput: The video URL or “embed” code, which you can copy in the Youtube page. You can use all of these different formats:






    • <iframe width="560" height="315" src="" frameborder="0" allowfullscreen></iframe>