LocalGov Drupal Override Filters Same-Day Food Waste Entries

Custom Display Logic Without Changes to the Whitespace Service
A blue and yellow Discover Drupal graphic shows Phil Norton speaking beside the LocalGov Drupal logo. The graphic text reads "DISCOVER DRUPAL" "Simplifying Council Waste Schedules" "A project specific data provider removes duplicate collection entries while preserving the existing Whitespace integration." "Phil Norton" "LocalGov Drupal" "Follow us on" "https://www.thedroptimes.com/" and "THE DROP TIMES".

Residents viewing waste schedules in a Central Bedfordshire project saw separate food-waste entries alongside refuse or recycling collections scheduled for the same day. Developer Phil Norton documented the resulting LocalGov Drupal customisation in a tutorial published by #! code on 19 July 2026. Phil reported that the revised display reduced one schedule from eight entries to four.

The duplication came from collection data supplied through the Whitespace integration. The project removed standalone food-waste rows and changed the refuse and recycling labels to show that food waste would be collected on the same day. This adjusted the public schedule without requiring changes to the external waste-management system.

The LocalGov Drupal Waste Collection module supports multiple data providers, including the Whitespace service used in this project. Phil’s implementation uses hook_data_provider_info_alter() to replace the Whitespace provider class with a project-specific subclass, then overrides getCollections() to filter entries matching the food-waste service label. The tutorial includes separate setup details for Drupal 10 and Drupal 11 and notes that Drupal’s caches must be rebuilt after the plugin definition changes.

Disclosure: This content is produced with the assistance of AI.

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Related Organizations

Related People

Upcoming Events

Latest Opportunities