It seems the dev release does not work for me (Drupal 5.7). Perhaps the CVS trunk has to be used instead?

Comments

nedjo’s picture

Please explain what you mean by does not work.

robserious’s picture

It appears to be completely ignored during the node_load process. node->teaser is set from the node->body.

FYI -> I created a new CCK item called Teaser, attached it to my new node type called News, set up the option on the CCK node type page to use Teaser as the teaser field, et voila? ...non.

Hope this is useful.

DrewMathers’s picture

I have isolated the cause of this problem. If the teaser field is in a field group, it is ignored. If it is not in a field group, it is used.

x.meglio@gmail.com’s picture

Hi.

I definitely can't understand how to use this module. Can somebody explain me? I can't find any documentation.

Anton

patrick_IRE’s picture

Meglio,

You go to Home >> Administer >> Content management >> Content types

then you "Add field"

select text field from the text box radial selection and create your field.

Then click on 'content management' from the admin tree and click on edit (which ever content type you want to have a teaser) such as page.

Where the teaser field dropdown box is located, select the field that you just created, and whenever you create a new page, there will be a teaser field that you can fill with whatever you would like to be displayed in place of your entire node content.

I hope this wasn't too late or unhelpful.

Patrick

michaelschutz’s picture

Hi Patrick,

I too am having trouble with this module - I can't figure out how to use it.

I've done everything in your steps, but get stuck on this: "Where the teaser field dropdown box is located, select the field that you just created, " I don't see this dropdown box anywhere.

I'm using the latest -dev of the 6.x version, and I don't see this option anywhere. The module's installed and enabled. I've created a new field called teaser, and on the Display Fields tab of the Edit Content Type section, I can assign it to display when I view teasers, but I don't think this is what you mean. Or is it?

In the Workflow Settings fieldset on the Edit Content Type main page, I have "Construct teaser only from teaser fields:" Enabled. But for the life of me I can't find where to assign my "field_teaser" CCK field to be the teaser (unless it's what I've already done on the Display Fields tab).

Thanks in advance for help. Some documentation would be most helpful.

chipt4’s picture

> I'm using the latest -dev of the 6.x version, and I don't see this option anywhere.

This is for Drupal 5.x

michaelschutz’s picture

chipt4, I'm using the 6.x version found here: http://drupal.org/node/184029/release.

gatiba’s picture

I have the mschutz 's same problem! I'm using Drupal 6.9 and i can't find any dropdown box to select teaser field!

bacchus101’s picture

I'm having the same issue as above.

I am using drupal 6.9 and using the 6x-1,0 version.

Is "teaser" supposed to be an option under widget type? I am not sure how to get this to function.

onejam’s picture

I think you have to use/change your field to a 'text field' and not 'text area'? at least that's how it's working for me.

ccshannon’s picture

duvien,

Just curious, since you have it working, does your custom teaser get inserted into into the head of your node body?

So, if you have a CCK teaser field and type "Hello World" and then go into the body and type "Hello World, it's me." Save the node, go back into its edit form, and now you have:

CCK Teaser Field:
"Hello World"
Body Field:
"Hello World"
"Hello World, it's me."

This is what's happening with me, at least.

onejam’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev

That's right, this happened to me as well until i changed the content-type field to a textfield (not textarea) and it was working fine.

Also, i think i have posted about wrong version. I am using 6.x-1.x-dev and i haven't tried the Drupal 5 version.

ccshannon’s picture

Thanks for that. Now I got it. At least I know I'm not crazy. Well, at least not because of this!

For now, I'll change the teaser field to be a text field since I don't need large teasers, but I'd love to see this little glitch fixed so we can use a textarea, as well.

I mean, c'mon nedjo, it's not like you have any other modules to maintain. I mean 2537 commits? What do you do with all your free time? Ow, not in the face. ;-)

onejam’s picture

I don't like wysiwyg editor but if you use one it does expand the textfield to be like a textarea. I use the wysiwyg API module and it works really well for my client.

ccshannon’s picture

Thanks for the tip! I do have WYSIWYG API and TinyMCE installed, but have it disabled while focusing on templates/workflow development. I will definitely make use of that when I re-enable it.

ccshannon’s picture

Well, I changed the CCK Teaser field to a text field instead of a text area. Still places the text into the content body.

I'll try removing the field entirely from all content types using it, creating it again and starting over with a new field.

onejam’s picture

Perhaps you haven't enabled your teaser field for the content-type?

Go back into your content-type and click edit tab. Scroll to the bottom where it says 'Workflow settings', in this section you will notice it has added an extra setting called 'Construct teaser only from teaser fields: ' this must be enabled to work.

See comments #5 above...

Thanks,

ccshannon’s picture

It is enabled. It's still doing it. I'm going to remove it completely from all content types and re-add it from scratch using textfield from the get-go. Hopefully that has an effect.

nedjo’s picture

I haven't found time to look at this. I suspect the implementation in the D6 version is better and the best thing would be to backport it to 5. I'd welcome a patch.

ccshannon’s picture

Thanks, nedjo. I can tell you're a busy one!

FYI, I'm talking about the D6 version. 6.x-1.x-dev. I've never used the D5 version.

onejam’s picture

If it's older node that has been created before you installed this module then i don't think it will work trying to remove the older teaser in body?

You will need to delete the node and recreate it. At least, that is what i had to do.

dddave’s picture

Could anyone who understood this thing please write a how to for dummies? This thing kills me because I don't get it working.

ccshannon’s picture

Here's the problem I was having, and it's not so much with this module, but with Drupal core.

I created my own teaser solution using a CCK textfield and some template functionality. But I came across another situation where I saw the teaser and body combined into the body field.

I'm importing data from another system into Drupal 6. When I build my node object, I put the body into $node->body, then I create a custom teaser and put it into $node->teaser.

That's the problem. Once you do that, then save the node, Drupal takes the teaser and puts it on the head of the body. Yikes!

Having two separate entities in the same field is extremely confusing for typical users. For my import process, I took out the $node-> teaser = $myteasertext part and let Drupal create the teaser itself. Muuuuuch better.

But that explains why I'm having the same problem with Custom teaser modules. To avoid combining teaser and body into the body field, the $node->teaser needs to be empty. To update it custom, it needs to be updated in the DB 'node' table directly, not via node_save.

onejam’s picture

$node->body combines everything (ie teaser and anything in body). So you're best to use this module to help separate the output.

In your case, once the content is loaded into node, could you not then go into it and take the text out from the body and place this into the teaser field (created with this module)?

ccshannon’s picture

What I did instead was create a separate textfield for custom teaser, sans module. In my templates, if that custom teaser isn't empty, it uses $node->teaser instead, which of course uses the system default teaser settings. This works fine for me.

When I had this module enabled, I set my textfield to be the custom teaser field, and anything I entered into it, ended up appended to the head of whatever was in the body tag. Even if I did not change the teaser field text, every time I published the node, the teaser text would again be added to the head of the body field, resulting in the body field having a repeating teaser at the beginning, and this text showing up on all my nodes, not from calling $node->body, rather $node->content['body']['#value'].

Example would look like something like:

This is the teaser.

This is the teaser.

This is the teaser.

This is the body text for the node.

========================

And this is not just on node view (using a custom template) but in the Node Edit form as well.