For the life of me I can't figure this out. I can make a custom CCK document, everything is peachy, I can select what is shown in the teaser and what's in the full version of the article posted, but on the main page when I look at the teaser, I don't see the "Read More" link. It's not very intuitive to have to click on the title of the article. Is this configurable somewhere ??? How do I get the "Read More" link. I don't have that problem on my other site...it shows up auomatically...it's an older version though. Appreciate any speedy input here.
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | 197707-cck-teaser-field-readmore.patch | 802 bytes | mrfelton |
| #10 | cck_teaser_field.patch | 533 bytes | bobmarchman |
| #5 | cck_teaser_field.module.patch | 582 bytes | TBarregren |
| #2 | cck_teaser_field-readmore.patch | 687 bytes | nedjo |
Comments
Comment #1
dendrob commentedComment #2
nedjoThe read more link appears when the value for
$node->readmoreisTRUE, which happens when the node body is longer than the node teaser, indicating that there is more to be read.This calculation is made in node module before we override the standard teaser in CCK Teaser Field. So whether or not there is a read more link depends on what the relative length of the teaser was originally--even though this comparison is now meaningless.
So, presumably, we should always set the readmore property to
TRUEwhen we override the teaser. I've applied the attached patch to do so.Please reopen this issue if that doesn't address the problem.
Comment #3
niklp commentedI had an inkling that there was something like this going on... but I just ignored it as I didn't have time to worry about it! :p
Glad to see someone's sorted it out, thanks very much. Will post any further findings.
Comment #4
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
TBarregren commentedIt seems to me that the bug is still there. The read more link appears only after I have entered a sufficient long text in the body. The attached patch moves the
$node->readmore = trueto the 'view' branch of hook_nodeapi. That works for me.Comment #6
nedjoThanks. Please go ahead and apply the patch to HEAD and to the DRUPAL-5 branch.
Comment #7
TBarregren commentedI have applied the patch to HEAD and to the DRUPAL-5 branch.
Comment #8
igorik commentedHi
I just tried latest CCK teaser module (Janurary 24th) and the read more link is not visible to me on frontpage.
Are there any necessary module for it? When I disable CCK teaser module and enable Excerpt module, I have read more link again.
Thanks
Igor
http://www.somvprahe.sk
Comment #9
bobmarchman commentedI had the same problem on my site (running Drupal 5.7), and after looking at the code inside node.module that handles teasers, I think this may solve the issue:
In node.module, line 721 we have the function node_prepare(). Here is where the $node->readmore flag gets set depending on a few things. It looked to me that when we are viewing a node, $node->teaser doesn't get set (since it's being overridden, maybe), and as such the readmore link wouldn't appear. I think this is because of the conditional inside the node_prepare() function. Basically, if $node->teaser isn't set AND $node->readmore isn't true, then the link never gets added to the $links array. I could be completely off with that explanation, but that's my take on it.
Adding the following to this module seemingly solved the issue:
change:
to:
Anyone think this is patch worthy???
Comment #10
bobmarchman commentedOk, went ahead and rolled up a quick patch anyway...
Comment #11
Felicity commentedHello,
I've tried the changes that you've made, but I still have the same problem :(
The "read more" is invisible when using both "cck teaser field" module & "Read More Tweak" module.
Any more ideas please?
Comment #12
bobmarchman commentedDoes it work with the Read More Tweak module disabled?
Comment #13
keenubee commentedFelicity, in your case try to modify "cck_teaser_field.module"
before:
after:
it works fine 4 me =)
Comment #14
popthestack commentedHere's the cck_teaser_field_nodeapi() function from latest patch in "Select multiple fields for teaser view" with a working read more link.
Since it's the teaser the body field should be blank anyway so you can just stick the read more link inside of the body field. Not the most elegant solution, but at least it works.
Edited to add: support for RSS feeds.
Comment #15
luisfeng commentedcck teaser field 6.x has the same issue.
Could anyone to make a 'readmore' patch?
Comment #16
rzelnik commentedsubscribe
Comment #17
mrfelton commentedI found that if you set $node->teaser to a blank value, as this module is doing then the read more link will simply never show. Setting $node->teaser to ' ' instead makes the read more link show up.
Patch attached (made against HEAD)
Comment #18
chromix commentedWorks fantastically well for me! I'd love to see this added soon.