0

This question always comes up when I need to design a structure for data. When should I create distinct content types and when should I differentiate between nodes based on custom fields.

For example, say I have a gallery of people and a gallery of places. they differ only by one field that i use in the people gallery and not in the places gallery. in code i can easily know when it's people or places based on this field.

this is just one example from the top of my head. i'm asking for general guidelines, and not a solution to this specific problem.

these are the points i've come up with to help decide between different content types or different fields:

  1. what are the chances one node will need to change type (people gallery suddenly becoming places gallery)?
  2. how much do the fields differ?
  3. how much you will need to create view with both types or with a single one?

any more thoughts?

3

2 Answers 2

1

It's a really open question, but I'll try to help you a bit.

Basic example is : I have to create "vehicules", some "cars" and some "motos". Should I create one content type (CT) with one field "type" (with "cars" and "motos" as available values") or 2 CTs "cars" and "motos".

Here is the points I look into before choosing:

  • fields: if the fields are the same between content types, just create one CT, if they're really different, then create 2 CTs.
  • display: if the display is the same, then chose 1 CT, if not, create 2 CTs.
  • views: will I make list of both CTs, or will they always be separated?
  • cross content: is it possible that a node is part of both CTs? For example, is a "can-am spyder" a moto, a car or both of them? If you have cross content, then I would suggest to have only one CT, which a multiple select for the "Type" attribute. So people searching for cars or for motos will find the spyder anyway.
  • how "smart"/involved are you Back-Office users? Usually when you choose to keep only one content type, you end up having a lot of extra fields to configure the theming, the little differences between your different types, etc. So the edit form can be really long and confusing. If you're the one configuring everything, that's fine. But if you need to explain the form to a lot of editors/contributors, this can be painful.

After counting the pro and cons, you can make your decision. Usually, I give 2 points for "fields" and "display", one point for "views", "cross content" and BO users... Make the sum and decide :)

0

I would always create a new content type. Here are some of my reasons:

  1. You can easily make a View, or Page override from a Content Type.
  2. You can administer different Content Types separately, and, thereby...
  3. Control user access with more granularity.
  4. Control visibility of secondary content with more granularity. Advertising, etc.
  5. Many components add features based on Content Type. Taxonomy, for example.

I could probably go on, but granularity, while it does add to the administrative overhead sometimes, pays dividends in the long run.

Not the answer you're looking for? Browse other questions tagged or ask your own question.