Field Tags

When using the stand-alone fieldtype you have access to a variety of variables containing information about your video that you can use to create your own embed tag or just display extra information about the videos. These variables are:

  • {field_name} This will give you the full iframe embed code.

  • {field_name:id} This will give you just the id of the video.

  • {field_name:description}

  • {field_name:width} The width of the video as chosen in the publish entry page. Note that the width value may be blank if it is not available in the YouTube or Vimeo response object.

  • {field_name:height} The height of the video as chosen in the publish entry page. Note that the width value may be blank if it is not available in the YouTube or Vimeo response object.

  • {field_name:author} The author of the video, or user who posted the video.

  • {field_name:length} The length of the video in seconds.

  • {field_name:thumbnail_small} A small thumbnail generated by the video service.

  • {field_name:thumbnail_medium}

  • {field_name:thumbnail_large}

  • {field_name:thumbnail_max}

For best results and control over the display of the video on your site, use the {field_name:id} variable and create your own embed tag in your templates, for example:

<iframe src="https://www.youtube.com/embed/{field_name:id}?rel=0&wmode=opaque" border="0" width="800" height="600"></iframe>

Low Variables Support

Reel supports Low Variables, but due to how Reel saves its data you must use the Low Variables parse tags. You can read about those tags from Low’s site.

Examples:

{exp:low_variables:parse var="lv_var_name"} 

Will return the entire embed tag for the video.

{exp:low_variables:parse var="lv_var_name" attribute="url"}

Will return just the URL for the video so you can embed it however you want. All the attributes listed above in the variables list are available. (The attributes are the values after the colon)

You can also access all the attributes individually through the pair tag.

{exp:low_variables:pair var="lv_var_name"}
    {embed}
    {description}
    {url}
{/exp:low_variables:pair}

Last updated