To add Content Types or not to add Content Types

(3 minute read)

… that is the question … (Ok, I couldn’t resist, I love puns and bad quotes) A few days ago I was working on a site where I had created a content type that just mirrored the standard Page type (just a title and a body). After looking at it for a bit I wondered if I should have just used taxonomy with the already existing page type to achieve the same effect. I ended up coming up with a list of rules to when you should create a new content type.

New Content Types should be created when (any of the following apply):

  1. You need to theme your node(s) of this type differently than other node types
  2. You want your node to be displayed differently than other node types (but don’t want to create a template file)*
  3. You want to have fields that aren’t provided by Page or Story nodes*
  4. You want to have different default settings for your node
  5. You want to have a different workflow than other node types*
  6. You don’t have taxonomy enabled and need to filter your nodes in Views
  7. You want to define different pathauto settings based on the content type*
  8. You might want to do numbers 1-7 at some point in the future (Future-proofing)

*Requires additional module(s)

For the case of my work numbers 1 through 7 didn’t apply since it was going to be themed the same, there weren’t going to be any different fields, all of the settings were going to be the same, the site didn’t use workflows, I do have taxonomy enabled (but this one didn’t really matter) and my pathauto could be defined by the taxonomy.

The deal breaker was #8, future-proofing. Without fail, when I try to save some time by using an existing content type for marginal content I have to go back and convert it to it’s own content type. For those of you who have had to do this, it’s not fun and it’s not easy to migrate your old nodes to the new content type. In addition to having to filter and migrate the existing nodes to the new node type I also end up having to do another production push which involves a puppy somewhere in the world having to be kicked (I kid, I kid)

Disclaimer: It is possible to have different content types without the CCK module. You just can’t add additional fields or do some of the easier theming stuff without it. When I refer to Content Type in this post I am referring to to the base content type, not any CCK mojo.

TLDR version: Using an existing content type is easier but could hurt you in the long run if there is the slightest chance you’ll have to make changes.

Categories: