I am new to Drupal and would love some guidance on how best to achieve the following:
An admin page that has (top-down):
- a date selector, defaulting to today's date
- a section displaying Arrivals for the date selected (this selects custom content type 'Bookings' with filter of arrivalDate = dateselected)
- a section displaying Departures for the date selected (this selects custom content type 'Bookings' with filter of departureDate = dateselected)
I'm interested in how conceptually an experienced Drupal developer would approach this with Views.
Note: The project uses Drupal 7.
My approach so far:
- One view with Page display that lists the Arrivals and uses an Exposed Filter for the date
- One view with block display that lists the Departures and uses a hidden filter for the date
- The block display (2) is shown in the Footer of page display (1)
- The mymodule_views_pre_build hook is used to set the exposed filter date in (1) and hidden filter date in (2)
The initial load of Page (1) is working fine. Changing the date via the Exposed Filter in (1) correctly updates the Arrivals list; but not the Departures. I'll need to update the hidden filter in (2) somehow.