Hello,

I wanted to open this topic because I discussed about it a lot quite recently and I would like to gather opinions about a specific example involving CCK and taxonomy. This discussion may be useful to Drupal newcomers as reference.

Among those two solutions, what would you do:

1) work with the "story" content type and create a "Content" vocabulary that contains 2 terms "Announcement" and "Blog" that gonna by used to categorize the content type.

2) clone "Story" to "Announcement" and "Blog" content types: you now have two content types that use the same fields.

---

Solution 1) brings you taxonomy based browsing: taxonomy urls can combine terms, ubrowser module can ease browsing (or taxonomy_browser when it's updated), etc. Also, as mentioned in a Lullabot podcast, taxonomy is somehow optimized because it stores information by ids compared to CCK. However, if for some reason you want to add fields to your "Announcement" nodes but not to "Blog" nodes, you're a bit stuck because you gonna break your workflow.

With solution 2), views can help you combining nodes. You can add fields whenever you want. Also, you are free to use different permissions for each type of nodes. If your "Annoucement" and "Blog" content types use the same fields forever (title and body), then it does not matter you don't lose anything.

Also, what I can see is that you don't need to rely on any trickery for theming (yes I think that using taxonomy for theming purposes is a bit trickery).

I somehow feel like this debate is close to something like "human readable vs machine readable". Should same fields and permissions mean same content type ? Since taxonomy is meant for categorization, should you use it to categorize content types ? (although it seems obvious you would not use it to differentiate between images and stories).

What do you think ? Can you see any other pro and/or cons to any of the above solutions ? Do you have anything to add to these ramblings ? :)

Comments

tdimg’s picture

I have found that some of my clients had difficulties with ambiguous content types, i.e. using the same content type for basically two or more different functions is for some difficult to grasp. It's easier for them if they can already choose the right type from the set go and then categorise it.

But as always this really depends on the type of website you're going to create, for whom it is and probably a lot of other variables.

nevets’s picture

While taxonomy and content types can overlap they can also serve distinct purposes. Personally I use the one that makes sense for the problem at hand. I use CCK (or custom content types) when the content type really represent diifferent things. To me an annoucement is not a blog and though one can use the same content type and taxonomy to differentiat them, to me they are distinct content types. If I make them unique content types I am also less tied to the structure (fiields) and also how I output them. I may want one to show the 'submitted' information while the other does not.

I use taxonomy to categorize like things, events are a good example. Typically the information I collect for an event is always the same, but they might be meetings, social events, days off or what ever. I normally use taxonomy in this case to categorize the event so people can see all events or just a subset as they wish.

guardian’s picture

To me an annoucement is not a blog and though one can use the same content type and taxonomy to differentiat them, to me they are distinct content types.

Ok then replace "Announcement" by "Article". They are pretty much the same thing, bunch of text, except that the intent is different

cog.rusty’s picture

Subscribing -- I'll post an opinion when time permits.

patchak’s picture

Hey there,

Well I think In my case I used to use taxonomy to differenciate between similar content types, but yet I had a feeling that it was wrong. Now with cck I always crete a new content type instead of using the same one with several taxonomies.

It's simpler for the clients they don,t have to know the difference between the categories and the same content type, and also they make less mistakes because they choose the right content type right from the start.

Also, if yu do content types, you can then add several taxonomies for each content types, without overloading the node creation form... Fir example blog and announcement each have sub categories and all, it's much cleaner when each content type is separated from the others...
Hope this helps, comments welcome..

Patchak

guardian’s picture

Thx for sharing your opinion.

categorizing content types with taxonomy has an out of the box advantage: links to other articles, other announcements, or other blog posts.

patchak’s picture

For really similar content types, maybe... But for different content types I just think it makes no sense to try and use taxonomy to 'fake' content types...

Also, at the moment you will need an extra field for any of the content types you'll be forced to add the field to all the content types that share the same taxonomy, so that does not really make sense and would confuse the user.