Control Content Visibility in a Gallery Group

The Gallery template group is specially designed to support the display of a combined media player and playlist on publication pages. Unlike other template groups, it can contain a Data Source (along with a Media widget and one or more Teaser/View Picker widgets. The Data Source returns a list of media content items for rendering in a playlist Teaser/View Picker widget. The user can then select media items from the playlist, which are played by the Media widget. For a full description of how a Gallery template group is used, see Define a Media Player and Playlist in the User Guide.

The Gallery group can contain more than one Teaser/View Picker widget: typically a second widget is used to render a summary for the currently selected media item so that a title and lead text can be displayed under or alongside the Media widget's video player as shown here:

Both Teaser widgets get their content from the same Data Source, but a summary widget needs to display only the currently selected content item. This can be achieved by making use of the wf-gallery-item and wf-gallery-selected-item CSS classes which are automatically assigned to Gallery content items by the Widget Framework. You need to include something like this in your publication CSS:

.media-summary .wf-gallery-item {
          display: none;
       }

.media-summary .wf-gallery-selected-item {
         display: block;
       }

and make sure that the media-summary class is added to your summary view widget's Widget wrapper settings / Style Class field (on the Advanced tab). (The class name media-summary is just an example, it is not supplied by the Widget Framework.)