PageBuilder
Visual section builder for MODX 3. Draft and publish without overwriting resource content

Responsive iframe from a video link. Common hosts are supported; VideoEmbedResolver parses the URL.
Информация
Requires PageBuilder Pro.
VideoEmbedResolver builds iframe for YouTube, Vimeo, RutubePaste the full Video URL from the browser bar, not embed HTML. Section title is optional.
| Parameter | Value |
|---|---|
| key | video |
| Layer | Pro |
| Category | media (media) |
| Chunk | pagebuilderpro_video |
| Requires | pro |
Fill these fields in the section inspector. Field types are documented in the field types reference.
title) Type text. Optional.
video) Type video. Required. Video URL. Site output is embed via VideoEmbedResolver.
Iframe inside pb-video. Aspect ratio comes from theme CSS.
Example payload after save. Media, video, and map values may be enriched on output:
{
"title": "Section title",
"video": {
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"embed_url": "https://www.youtube.com/embed/dQw4w9WgXcQ",
"provider": "youtube"
}
}Fenom chunk pagebuilderpro_video:
<section class="pb-section pb-section--video pb-video{if $cssClass} {$cssClass|escape}{/if}" data-pb-section="video"{if $id} id="pb-{$id|escape}"{/if}>
<div class="pb-section__inner pb-video__inner">
{if $title}
<h2 class="pb-heading pb-video__title">{$title|escape}</h2>
{/if}
{if $video_provider}
{var $providerLabel = $video_provider == 'youtube' ? 'YouTube' : ($video_provider == 'vimeo' ? 'Vimeo' : ($video_provider == 'rutube' ? 'Rutube' : $video_provider))}
<p class="pb-video__provider">{$providerLabel|escape}</p>
{/if}
{if $video_embed_url}
<div class="pb-video__embed">
<iframe src="{$video_embed_url|escape}" title="{$title|default:'Video'|escape}" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen loading="lazy"></iframe>
</div>
{elseif $video_watch_url}
<p><a class="pb-button" href="{$video_watch_url|escape}">Watch video</a></p>
{/if}
</div>
</section>PageBuilderPro/core/components/pagebuilderpro/sections/video.json