Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 542 Bytes

06-embed.md

File metadata and controls

19 lines (12 loc) · 542 Bytes

Templating the Embed field

The Embed field will let content writers paste an oEmbed supported service resource URL (YouTube, Vimeo, Soundcloud, etc.), and add the embedded content to your website.

Display as HTML

Here's an example of how to integrate the Embed field into your templates. In this case the Embed field has an API ID of video.

php (sdk v4 or later):

<div><?= $document->data->video->html ?></div>

php (sdk v3 or earlier):

<div><?= $document->get('product.video')->asHtml() ?></div>