Here's a strangely simple notion which I can't seem to figure out:

Let's say we're making a car site, featuring "sports cars","suv's" and "minivans". I can create a separate page for each category (like "site.com/sportscars"). And on each separate category page I can list all the cars in that category. Thanks to Terms, I can even list the same car in two different categories. Thanks to CCK I can create all sorts of extra fields. Now, on the category page, all we need is the Name of the car, a Thumbnail picture, and a Brief Description. Clicking on the name of the car would bring us to a single-car page (like "site.com/sportscar/ferrari") which shows us the Name (like on the category page) and also a large picure, a long description, and other things like Year, Price, etc)

So I guess am looking for a way to have 2 kinds of nodes - a summaryNode, which would be on a category page, and a detailNode, which would be on a page by itself (with different and much more information than the summaryNode)

This seems like a basic way to present information and I can't imagine it's not part of Drupal by default. Am I missing something here? How can I achieve a summary/detail pairing?

Thanks very much for any help you can throw my way!

Comments

nevets’s picture

In drupal a summary is called a teaser. I have not tries CCK since they added teasers, but if they auto generate a thumbnail you can use that in the teaser, otherwise you will need to add another image for the thumbnail. You will probably also want to add 'brief description' field. The basic point is you only need one content type and it collects all the information needed for display in both the teaser and full view.

The next part is to provide you own template file or use Content Templates. One of the variables available is $teaser, so you can choose what to output depending on the value of $teaser.

photoboy’s picture

Thanks, that really put me in the right direction!

Using CCK, Contemplate, and Views, I am able to do exactly what I wanted. However, I don't understand why I have to use 3 extra modules to do what seems like a basic thing. (And how did users manage to do this before all these modules were written!?)

To summarize, if it will help someone who's in the shoes I was in a few hours ago:

* CCK will allow you to make custom content types (i.e., Cars) with custom fields (i.e., category, year)

* Content Templates will allow you to define "teaser" and "body" templates which in my language correspond to "summary" and "detail"
Using this module, you can insert, for example, a couple of variables for the teaser and more, or different variables for the body.

* Views will allow you to create custom pages containing, say, teaser nodes of all cars of category "minivan"

nevets’s picture

If you consider only core and core content types such as story and page the content is the body, there is not a collection of various pieces of information to make the body. As such the teasers is auto-generated from the body (simply a shorten version). With core you can list all nodes is order submitted or using taxonomy, categorize the content only listing stories/content of that type (in both cases listing the teaser version).

You could choose to write your own module and collect what ever information you like. You are also then responsible for defining what the body and the teaser look like and can also choose to provide alternative list pages if you like,. In this case you need to do most of the work to make an extended content type.

With CCK instead of needing to code a module to collect the information, you define a content type. But CCK can not guess what you want the teaser to look like so that is where content templates come in. It allows you define the look of the teaser and complete view of the content without needing to write a template file.

While you do not need the views module to list only cars of cartegory "minivan" (you could just use the taxonomy module), it provides more flexablity.

In short, before CCK (or flexinode for that matter) you could
Choose to stick with a simple content type (with just a body) while optionally choosing the theme the look.
Or write a custom module that provided more flexability and control but required more knowledge and effort.

CCK and Content Templates then aim to given you the flexability of a custom module without needing to know as much.
The views module adds greater flexability in how lists of content are constructed and viewed.