The Software
To produce an interactive website to present local food products and their food miles implications, we needed software. Rather than write something from scratch, we opted to use an existing "content management system" (CMS). A CMS is a piece of software written to produce database-driven websites, in which, typically, information is stored in database tables and displayed to site visitors. There are hundreds of content management systems out there, of which dozens are "open source" (free to use and develop). (For a sampling of open source CMSs, see http://www.la-grange.net/cms.)
We chose to work with Drupal, an advanced and well-designed open source project with a skilled international development community. Drupal already included many of the features we were looking for like:
- Online interface for administering a site and uploading content.
- Advanced categorization system, suitable, e.g., for categorizing food resources by location, products, production techniques, etc.
- Support for users and groups, each with distinct priviliges.
- Various add-ons, including an event calendar.
Crucially, Drupal is written specifically to enable relatively easy extension through creating custom "modules" for specific purposes.
So the task of designing our software involved two steps:
- Set up, install, and configure Drupal.
- Write custom code to provide enhancements--needed functionality not already available.
Custom modules
Drupal features a set of tools called "hooks" to provide custom handling of specific content types. To inventory food resources and calculate food miles, we needed to produce custom "modules".
Food resources
Drupal has a system for different content types, called "nodes". To enable storage and display of information on food resources (farms, produce stores, restaurants, etc.), we wrote a custom node module. We also enhanced it to allow mass emailing to all resources (e.g., to provide site updates).
download the module.
Food miles
We were using Drupal's existing categorization system, called "taxonomy", to track info on the different locally produced food products (e.g., which food resources produced or sold them). To enable calculation of "food miles" information on these products, we needed to extend the taxonomy system to link to information on the source countries of the products.
download the module.


