Active
Project:
CCK Teaser Field
Version:
6.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2008 at 10:54 UTC
Updated:
27 May 2009 at 21:29 UTC
It seems the dev release does not work for me (Drupal 5.7). Perhaps the CVS trunk has to be used instead?
Comments
Comment #1
nedjoPlease explain what you mean by does not work.
Comment #2
robserious commentedIt 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.
Comment #3
DrewMathers commentedI 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.
Comment #4
x.meglio@gmail.com commentedHi.
I definitely can't understand how to use this module. Can somebody explain me? I can't find any documentation.
Anton
Comment #5
patrick_IRE commentedMeglio,
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
Comment #6
michaelschutz commentedHi 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.
Comment #7
chipt4 commented> 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
Comment #8
michaelschutz commentedchipt4, I'm using the 6.x version found here: http://drupal.org/node/184029/release.
Comment #9
gatiba commentedI have the mschutz 's same problem! I'm using Drupal 6.9 and i can't find any dropdown box to select teaser field!
Comment #10
bacchus101 commentedI'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.
Comment #11
onejam commentedI 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.
Comment #12
ccshannon commentedduvien,
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.
Comment #13
onejam commentedThat'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.
Comment #14
ccshannon commentedThanks 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. ;-)
Comment #15
onejam commentedI 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.
Comment #16
ccshannon commentedThanks 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.
Comment #17
ccshannon commentedWell, 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.
Comment #18
onejam commentedPerhaps 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,
Comment #19
ccshannon commentedIt 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.
Comment #20
nedjoI 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.
Comment #21
ccshannon commentedThanks, 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.
Comment #22
onejam commentedIf 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.
Comment #23
dddave commentedCould anyone who understood this thing please write a how to for dummies? This thing kills me because I don't get it working.
Comment #24
ccshannon commentedHere'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.
Comment #25
onejam commented$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)?
Comment #26
ccshannon commentedWhat 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.