O'Reilly logo

Drupal 7 Development by Example Beginner's Guide by Kurt Madel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Developing a custom module

Although the integer field type seems to be the best choice for the duration-related fields (cookTime and prepTime) in our Recipe content type, it would be nice if 60 minutes was displayed as 1 hour, and 90 minutes was displayed as 1 ½ hours. One way we can make this happen is to develop a custom module to create a custom field formatter that will display the duration related fields of cookTime and prepTime as hours, instead of minutes.

Module development is an important building block of the Drupal CMS, and it is helpful to understand that, generally speaking, there are three different types of Drupal modules:

  1. A core module is any module that comes pre-packaged with Drupal.
  2. A contrib or contributed module is any module ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required