Building a Feature for your Drupal 7 site.
As a law enforcement agency, you may want to present information about your open cases on your website. This can be useful for collecting leads from the public; furthermore, greater transparency leads to greater trust in your organization. The Georgia Bureau of Investigation does exactly this with their Cases page.
Drupal excels at taking your case data, helping you structure it, and then formatting it for display. You can use core Drupal and few popular contributed modules to recreate most of what GBI has on their website without touching any code. For extra flair, you can add a couple snippets of custom code to smooth out the user experience.
In this tutorial, you are going to:
- Build a Case content type
- Build a view
- Export all your new configuration to a reusable Feature.
- Add custom code that:
- Prefixes extra information to the case node title.
- Changes the display label of the Case Date per Case Type.
Ready? OK!
A working Drupal 7 site with these contributed modules installed. If you need help installing contributed modules, you can refer to this documentation on drupal.org.
- Features
- Views
- Date, Date API, Date Popup, Date Views (these are all packaged with the Date project)
- Field group (optional)
(If you don’t have a development environment and don’t want to use your production site for this exercise, you can quickly set up an empty Drupal 7 site using Acquia Dev Desktop and use that. Your new configuration will be portable between sites!)