Content Type Madness (CTM): Symptoms, Treatment, and Prevention

[img_assist|nid=1045|title=|desc=|link=none|align=left|width=100|height=80]Content type madness is a common disease that effects drupal sites of all sizes. It is most frequently seen in drupal 5 and 6 sites, as result of content construction kit.

It is a serious, chronic disease that can result in long term damage to a site's agility, usability , and information architecture.


Common symptoms of content type madness include:

  1. More than 11 content type*
  2. Dubious distinctions between content types [e.g. press release, vs. annoucement, vs. news item, vs. alert]
  3. No use of drupal taxonomies
  4. Overuse of views
  5. Users of site reporting feelings of malaise, and depression after working with content on the site.

Frequent complications of content type madness include:

  1. Improperly set content defaults, ranging from internationalization, to comment settings, to publishing workflow, to user permissions.
  2. Presentation inconsistency due to the proliferation of node-[type].tpl.php files.
  3. Switch statements that exceed 200 lines in the hook_preprocess_node(&$vars) function in the template.php file.

Treatment Options:

Treatment of content type madness is usually difficult,  time consuming, and often requires the services of drupal specialists. In severe cases, treatment requires a total redesign and refresh of content. If you have never attempted to treat content type madness, BACK UP THE DATABASE BEFORE YOU TRY.


The good news is that content type madness is easily prevented by following a few rules of thumb:

  1. Remember: every new content type you add is another demon, that requires a new set of CCK fields, content defaults, and often node-[type].tpl.php files.
  2. Never use a content type when a taxonomy term will do. For example, news, press releases, alerts, and announcements can often live in one content type, with a vocabulary specifying the difference. Clients will often find this approach easier in our experience.


Don't forget, content types are not always a sign of the disease, and can proliferate in perfectly healthy drupal sites. Examples of healthy content types:

  1. Types that are defined by a module (e.g. panels, webforms)
  2. Content types with different permissions (e.g. press release vs. community forum posting)
  3. Content types that require a unique set of custom fields .
  4. Content types that require a design that deviates from the standard.
  5. When one content type inherits fields from a parent content type. E.g. Show Vs. Episode.


Adding new content types is always evil, but sometimes is a necessary evil. In all cases, try to make it work within one content type before you add a new one.


* [ insert overused movie quote and reference here ]