Build playlists automatically using data filters
In this article we'll explain how to use the power of data filters to automatically create playlists from content across the system without any intervention from your editors.
Create a playlist of all videos or audio in a folder
This is probably the most common use of a data filter to generate a playlist and is easy to follow. More complex filters can be built on this foundation.
- With a audio or video web control inserted into page. Right click the web control and select Web control Properties from the context menu. The Control properties screen will open.
- Select the Playlist tab.
- You'll be presented with a series of Playlist Types in the form of radio buttons. By default CMS Content will be selected. Select the Data Filters radio button.
- You will be presented with a CMS Data filter to build your playlist.
- Under the Column section of the data filter table select Property_F_ID this sets a filter to look for a folder by its ID.
- Under the Type section select EqualTo
- Under the Value section type in the ID of your folder.
- You can find a folders ID using the Information screen. Right click the on the folder in the project explorer and select Information from the context menu. You will find the folder ID in the table.
- Once saved the player will generate a playlist based on the content that exists in the folder you specified.
Sort the playlist order
You can programmatically set the sort order of the playlist by using the Order by option below the data filter table. This input expects simple SQL Order By statement based on the data filter property references or custom metadata values.
The following examples will get you started. The ORDER BY part of the statement is implied.
Some example ORDER By Statements
|Condition||ORDER BY Statement|
|Sort by filename ascending order (A-Z)
||property_label1 or property_label asc
|Sort by filename in descending order (Z-A)
|Sort by date created ascending order
|Sort by date created and by filename
|Sort by date created descending order and by filename
||property_datecreated desc, property_label
- 1Ascending order is implied by default
- 2Comma separated list of properties
Was this article helpful?