Media Player/Playlist for In-line Content

You can display a media player/playlist combination for in-line media content by making use of a Master view. A Master view is like a Master widget – it displays a set of widgets defined in a master template. However, unlike a Master widget, it cannot be placed directly in a template. Instead, it must be used in combination with a Content Body widget. It can then render content delegated to it by the parent widget.

The Master view was introduced specifically to support the display of media player/playlist combinations for in-line media, and can be used as follows:

  1. Open the content template to which you wish to add support for in-line media playlists.

  2. Create a master template (see Master Templates) containing a media player/playlist template group structure as described in Define a Media Player and Playlist.

  3. Open the content template's Content Body widget (or create one and add it if necessary). This widget renders content items' Body fields.

  4. Make sure that the Content Body widget's Inline content option is set to true – otherwise any in-line content will be skipped.

  5. Create a Master view and set its Master section field to point to the master template you have created.

  6. Drop the Master view you have created on to your Content Body widget's Related view relation.

  7. Edit the Master view's Owner Widget Settings fields to indicate what types of content items it is intended to handle. To display all in-line videos using this Master view, for example, you would set Select by to Content type and add Video to the Content type name field.

With this configuration, every time the Content Body encounters an in-line item in the body field, it will not attempt to render it itself, but instead pass it on (that is, delegate rendering) to one of the views in its Related view relation. It determines which view to delegate the item to by examining the views' Owner Widget Settings and choosing the most appropriate view.

During the rendering process, the delegated video is the context content item, and its home section is the context section. Typically, you would want to have configured the data source in the master template with a query that makes use of these context items to return related videos for display in the playlist. You might, for example, have configured the data source to use Query by shared tag. This would result in a playlist containing videos that are tagged with the same tags as the delegated in-line video.