hello all!


-using drupal 5 (latest version)
-using cck to create custom content type
-used both the new feature in cck "display fields" for teaser and contemplate module to make teaser


-the "add comment" link always shows up- i can not get the "read more" link to show...ideally looking to get just the "read more" link showing

can't find any documentation to resolve this issue if you can help or point me in the right direction it would be much appreciated



VM’s picture

the read more link only shows when the content is larger than the teaser setting. you can set a <!--break--> in your content to force the read more link to show, however, there must be more to read for the read more link to be visible.

henns20’s picture

the custom content type i made is not a traditional ---title--body--- type where the

would resolve the issue----

for instance say i am using all image fields or link fields in cck custom content type- how could i get a link that refers to the whole node like "read more"

example workflow

- create 10 images custom content type
-limit what is in the tease - by contemplate or "display fields"

the issue
how to get a link at the bottom of the teaser like "read more" (link that helps to direct the person to the whole node

i guess what would be the easiest is a teaser.tpl.php ----does drupal support such a file out of the box?


ChrisKennedy’s picture

I think you want #3 at http://drupal.org/node/106951

henns20’s picture

i am baffled that i did not find that post....i looked for a heck of a long time

seems like a weird hack- wonder if that is the only way?

thanks again


mine@subnet142.com’s picture

I am on Drupal 5.1 and CCK 1.5. The teaser-breaks work for the CCK fields out of the box (I don't even need the contemplate). However, while the field_bodies are trimmed correctly, readmore link is still missing. I ain't sure but it seems that the line:

 $node->readmore = (strlen($node->teaser) < strlen($node->body));

inside node.module seems to have the length comparison done without including the cck fields.

Am I missing anything?

Many thks,

matt_harrold’s picture

The "smarts" behind the readmore link aren't really smart then.

Perhaps a flag should be set if something is trimmed, and that flag used as the basis of readmore display.

You've pointed out a pretty silly limitation, and hopefully it can be improved upon.

TSE’s picture

same prob, "read more" is not shown in trimmed CCK Field, just posting it to stay informed ;)

Carl Ditzler’s picture

I'm duplicating this issue. It seems <?php print $node->readmore ?> would do it.

jsimonis’s picture

<span class="readmore">» <a href="node/<?php print $nid ?>" title="Full event details">Read more</span></p>

The above is what we've been using. When we pull in the code quam gave, it doesn't work because it doesn't see that there is anything else to readmore to. It even says "false" under the coding in the contemplate window.

But using what I gave above will force it to show up. However, it shows up on its own line - not with the other links.

Jenni S.
Portland, OR metro area
Contact Me

henns20’s picture

great fix:)


jsimonis’s picture

I found it somewhere else, tested it, and it worked.

It'll be great when teasers made with cck have the read more ability built it. But until then, this works fine.

Jenni S.
Portland, OR metro area
Contact Me

jruz’s picture

if you are using clean urls you could use this code

<span class="readmore"><a href="<?php print base_path() . $node->path ?>">Read more</a></span>

its strage but to work for anonymous users you need to give access permission to "administer url aliases" for the path module

Coupon Code Swap’s picture

Gotta love Drupal for the flexibility. On a new site I'm working on, I eliminated the body field so I can theme the node better and I'm using CCK entirely for input. Then I set some of the CCK fields to not appear on the teaser. Of course, the read more disappeared, but I want it to always be displayed. This code worked perfectly when placed in the node.tpl.php file and you have more options for placement.