Download & Extend

Place link even when full content length is shown in teaser.

Project:Read More Link (Drupal 6 and earlier)
Version:6.x-5.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Would like the option to always place the read more link, even when the full length of the body is shown in the teaser.
The body of my content is just the summary and all the fields (and comment discussion) are what would constitute the "more."

Imagine this is somewhat normal.

Comments

#1

Here's my little hard coded not-so-great solution.

<?php
function force_readmore_nodeapi(&$node, $op, $arg = 0, $arg2 = 0) {
  if(
$op == 'view') {
    switch(
$node->type) {
      case
'my_content_type' :
      case
'another_content_type' :
        if(
$arg) { // In teaser mode...
          // Force the read more via ed_readmore module regardless of length.
         
$node->content['body']['#value'] = (module_exists('ed_readmore')) ?
           
ed_readmore_link_place($node->content['body']['#value'], $node, 'inline') :
           
$node->content['body']['#value'] .
             
' '.l('read more',$node-path,array('attributes'=>array('rel'=>'nofollow')));     
        }
      break;
    }
  }
// End view op.
}
?>

#2

...and it was actually easier to create a patch to add the feature.

AttachmentSize
force_more_link-1308234-0.patch 1.89 KB
nobody click here