Posted by sjdavis on June 30, 2008 at 12:49pm
Hi everyone, Please help!
I'm just getting started entering content into my first Drupal 6 site and I am struggling with how to keep all the content organized and reusable. I already have what I think are too many content types. Seems like the content types should be generalized and less descriptive so I can reuse them whenever I want. What is the best way to keep Content Types simple/easy-to-use while maintaining reusability?
BTW, I'm using Views to create custom queries for page display.
Comments
Don't create any content types that you don't need
I suggest that you do not use content types for presentation unless you have a specific need. In other words, if you just want to give something a heading, do it in the body You can organize your content using taxonomy.
On the other hand, if something needs discrete, for a specific use, say in a view, a new content type is called for. Likewise, if you have groups of content that need different rights assignments, content types might be the best way for you to accomplish that. You can use taxonomy for right assignment as well, but that really works best for content that already exists.
Don't over-generalize complex content types. You wouldn't want to create a content type with a separate field for every possible MARC subfield, for example, as it would be unmanageable. Likewise, creating a universal content type with every field you might ever need may be a usability challenge. On the other hand, you can manage reasonably complex types using collapsible field groups, so a universal type (or almost universal type) isn't necessarily bad.
If you want to get tricky, you can use CCK to create one field that serves as a label for another field, in effect creating an assignable content field. I am not sure what the use case would be for this, and it would require a bit of effort to use effectively, but it would definitely be flexible.
Administer>Content Management>Category
You might want to explore how categories work so that you can limit the content types that you have.
http://drupal.org/handbook/modules/taxonomy/
Using Vocabularies, and Terms can help you filter pages that are of the same content type but are for different things.
For example, say you have Events for three different age groups. You could create an "Event" content type then add a vocabulary called "Age Group" and then add three terms for that: Adult, Teen, and Children's. Then on the Taxonomy Administration page you could apply this new vocabulary to only show on the Event content type.
Internally the vocabularies get a number. Imagine that "Age Group" got the number 2.
By default Drupal would allow you to filter content with urls like this
yourwebsite.org/taxonomy/term/2
Then you could use a URL Alias to redirect the ugly url alias to something cool like
yourwebsite.org/events
With the powerhouse module "Views" You can take this to a higher level. Once you start using it, it's hard to live without. Using Views you could create a page that meets certain criteria.
Using drop down menus on the add view page you could create the logic would be something like this:
Create a page at yourwebsite.org/events/adults
that is an Event that has the age group adults
make the list have the full post
order the posts (nodes) in descending order
Examples
After you save that you could go to a page that would list something like the following page:
http://www.hooverlibrary.org/thelibrarytheatre/season/2008-2009
That example uses a content type called "Show" a vocabulary called Season, a term called 2008-2009.
Using another view you could create this page in views using the same posts that just show a table with links of the titles of all seasons.
http://www.hooverlibrary.org/thelibrarytheatre/season/
More
Categories / Taxonomy can get tricky depending on how detailed you want to get.Views is scary at first, but indispensable.
In the future you might want to also use CCK (Content Construction Kit.) It allows you flexibility when creating content types. Content Template is a another must. it lets you template and style the output of your nodes (posts.)
Take it slow, you'll get the hang of it. Install a junk site that you can test this stuff on so you don't mess up something you go live with.
Module links
http://drupal.org/project/views
http://drupal.org/project/cck
http://drupal.org/project/contemplate
Extras for CCK
http://drupal.org/project/imagecache
http://drupal.org/project/imagefield
Screencasts are Helpful
http://learnbythedrop.com/
http://theartlab.net/podcast/drupal-school
http://drupal.org/node/174285
http://learn.awakenedvoice.com/2007/07/30/drupal-cck-and-views-tutorial/
I'm not a master of Taxonomy by any means. If anyone sees errors or has better details, please comment.
Even Better
Following is a link to a recording of a lecture by Jennifer Hodgdon using some of the things I mentioned above. CCK and Views as well as the logic behind how you can organize fields for content construction are explained in greater detail.
http://www.ustream.tv/recorded/418358
The outline with images that goes with the talk:
http://poplarware.com/drupaltalk.html
She also mentions a cheat sheet for Drupal. It's a great resource for people that know nothing or know a lot about Drupal. It's darn good.
http://poplarware.com/drupaltalk.html