2

I'm building a radio station page with Drupal 7, and I would like to display in a block the current show on air, but I can't find a way to do it. I have installed the Views, Calendar and Date modules, a show content type with the starting date (and hour) and the ending date (and hour too). How show the query and filtering be done in views to display only one show and the one that is currently at the same time as the system time?

1 Answer 1

2

Basically, you want to tell views to display nodes with starDate <= *NOW* AND endData >= *NOW*. i.e. if now is 11:50, a program from 11 - 12 should be displayed.

This could be done fairly easy via views, following are two screenshots of the two filters you're gonna add to the view:

enter image description here

enter image description here

Hope this helps.

3
  • Hey friend, great answer. Did you have to resize those screenshots you included in your answer or is resizing done on the fly? Dec 15, 2011 at 23:03
  • heh, it has been resized automatically.
    – Remon
    Dec 17, 2011 at 10:32
  • In case you're scratching your head, wondering why the date filter criteria page doesn't look like those nice screenshots above, you need to enable the date_views module (packaged with Date API). Your welcome in advance ;) Nov 29, 2012 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.