I am using contemplate 1.6 (current CVS download) as an upgrade from 1.5, which did not solve a problem I'm having. The template seems to be ignored. Nodes are showing up on my front page with the full view. I even created a view with a page providing a "teaser list" to make double sure. If I look at the node structure I can see that the teaser is filled in properly. I put "Teaser:" at the beginning of my teaser template and "Body:" at the beginning of my body template to make sure that contemplate is actually doing something. It is...

Here are my templates:

Teaser:

Teaser: <?php print $teaser ?>

Body:

Body: <?php foreach ((array)$field_game_text as $item) { ?>
  <div class="field-item"><?php print $item['view'] ?></div>
<?php } ?>

So I go to my teaser view page and I see "Teaser:" at the top of the text like I expect. But then I see this code:

<div class="content">Teaser: <div class="field field-type-text field-field-game-text"><h3 class="field-label">Game Text</h3><div class="field-items"><div class="field-item">

Which is followed immediately by the content. This is the content that should be displayed only if contemplate is not involved. So what appears to be happening here is that the $teaser value in the template is being replaced with the $content somehow? Again, if I go look at the node structure, the teaser IS properly set in the node.

This must be a problem with either cck.module or contemplate.module botching the value of $teaser before contemplate can print it, but I don't know which, so I came here. I hope that I'm not trying to actually report a problem with cck, but I can't tell which is the problem.

I just updated cck after updating contemplate didn't solve the problem, and of course that didn't solve it either, or I wouldn't be here...

Comments

hyperlogos’s picture

As an addendum, it looks like the template is working for body content; when I view a node itself I see "Body:" at the top but as per my template, no field name. It's only teasers that are broken.

Anonymous’s picture

I'm not sure it is a contemplate bug.

So far, I've not been able to find on the CCK documentation what the teaser of a CCK node should look like. Should it look like the concatenation of each field teaser ? Should it look like the first field teaser ?

In CCK sources, it seems to call the teaser function of each field.

I've looked through Contemplate source code, and the node informations that are available to templates are sent by Drupal itself.

I use Contemplate and for the content (for which I need a teaser), I use functions offered by the SuperTeaser module. It lets me decided precisely what the teaser should look like.

hyperlogos’s picture

The whole point of contemplate is that it permits you to define precisely what a teaser and a body of a CCK content type should look like. It's not doing that. Therefore it's a contemplate bug, or a core bug being touched off by contemplate... But I'm putting my money on contemplate.

jrglasgow’s picture

Status: Active » Postponed (maintainer needs more info)

Is this still a problem with Drupal 5, or 6?

hyperlogos’s picture

Right now I'm using drupal 5.7 and I'm not having this problem, or at least, don't appear to be.
I'm looking forward to the modules I use being ported to drupal 6, so that I can have non-lame teaser support.

jrglasgow’s picture

Status: Postponed (maintainer needs more info) » Fixed

since you are currently not having this problem, I will mark this fixed

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.