Hi everyone,
I'm working on a station site for our college radio station, and wanted to share how I created a View that lists recently played songs, with the most recently played on top (trying to mimic something like on (http://thecurrent.org). You could also modify this to make a "now playing" block that shows the first song in the list, aka the song playing right now.
To drupal power developers, this may seem obvious, but I'm new to drupal and thinking that anyone else with similar experience to mine might find this helpful
Basic Settings
Style: Unformatted
Row Style: Fields
you can change this depending on what you want. I just wanted a block with a list of "song artist" - "song title" elements
Fields
Station Playlist: Artist
Station Playlist: Title
you could also add album, link, etc. if you want to display more than just artist and song name
Sort Criteria
Node: Nid (descending) -- this puts the most recently created playlists at the top of the list
Station Playlist Track: Weight (descending) -- this puts the most recently entered songs at the top within each published playlist
The order of these are important. Make sure Node ID is above Station Playlist Track Weight.
Filters
Node: Type = Program Playlist
That's it! Pretty simple, but the sorting took some time to figure out. I hope this helps for people looking to create a similar feature.
Attached is the exported View.
| Attachment | Size |
|---|---|
| recentlyPlayed_viewExport.txt | 3.87 KB |