Advanced Theming: Writing Field Formatters
Along with theming Views, understanding jQuery, and a handful of other techniques, this is one of the more important skills a Drupal themer/developer can have. Sadly, a lot of people don’t even know this exists.
Field Formatters are Drupal Field API’s (and CCK for D6) method of outputting data. Formatters are swappable, configurable, exportable, and most important, reusable.
We’ll go over all of Field API’s hooks that pertain to formatters, I’ll demonstrate how to build a simple formatter from beginning to end, then we’ll walk-through some demonstration code and see some practical and advanced use-cases in action.
If you don’t know PHP yet then this topic might be a little daunting. Although, even as site builders it’s a good idea to understand how these things work under the hood. Best practices will definitely be discussed here.