Define channel page layouts

30/11/2019
The YouTube XML format is being replaced by DDEX (music only) and CSV templates (all industries). YouTube strongly discourages any new implementations of the YouTube XML format. This page should be used solely as reference material for existing implementations. Visit Using the YouTube DDEX feed for more information about the new format.
The features described in this article are available only to partners who use YouTube's Content Manager to manage their copyrighted content.

Channels with the YouTube One Channel design have a Browse view that showcases their content. The Browse view organizes channel content into customized sections that display videos from particular playlists or based on channel usage, like the most recent or most popular videos. You can also choose a "trailer" video to show to non-subscribers when they visit your channel.

The <channel> tag sets the custom layout of the Browse view by specifying which <sections> to include and which video to use as the <trailer>. You can only set the layout for an existing channel linked to your content owner, and the channel must use the YouTube One Channel design for the settings to have any visible effect.

The following example configures the channel's Browse view to include a trailer and four sections. Each <section> has a type attribute that specifies which videos to include and a style attribute that specifies the layout for that section. The first section displays the videos from the specified playlist in a horizontal row (style="expanded"). The other three sections retrieve videos based on channel activity – recent uploads, likes, and upcoming events – and display only the first item (style="compact").

<channel id="CHANNEL_ID_1_">
  <trailer video_id="VIDEO_ID_1_" />
  <sections>
    <section type="single_playlist" style="expanded">
      <playlist id="PLAYLIST_ID_1_" />
    </section>
    <section type="recent_uploads" style="compact" />
    <section type="likes" style="compact" />
    <section type="upcoming_events" style="compact" />
  

Updating channel layouts

When the feed includes the <trailer> or <sections> tag, the specified layout overwrites the current layout of the channel's Browse view. To retain the current trailer video or sections, omit the <trailer> or <sections> tag. Use the following tag to remove the current trailer without providing a replacement.

 <trailer action="delete" />

* Nguồn: Youtube