More configurable text and title
eaposztrof - November 9, 2009 - 02:39
| Project: | Read More link (Drupal 6 and earlier) |
| Version: | 6.x-5.0-rc2 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Todd Nienkerk |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
Added more function, like add $node->title, with prefix and suffix to the text or to the title. The hacked pack is attached. Sorry for that, but no comments added, and it's a hurry up! project..
| Attachment | Size |
|---|---|
| ed_readmore-6.x-5.0-rc2-hacked.tar_.gz | 9.84 KB |

#1
Someone submitted a patch for Token support that I committed earlier today. I'm pretty sure this will do exactly what you want. Can you confirm?
Issue: #465140: Use tokens such as [node-title] for Read More links and link attributes
#2
Uhm.. yes, the yesterday published rc4's tokens the best choice.. but there is an another thing to do..
<?phpfunction ed_readmore_link_render($node, $display = 'inline') {
...
if (variable_get('ed_readmore_strip', TRUE) && is_numeric($link_text_maxlenght)){
$link_text = substr(htmlspecialchars($link_text, ENT_NOQUOTES),0,$link_text_maxlenght);
}
...
return theme('ed_readmore_link', $node, $link_text, $link_options, $separator, $display);
}
?>
to strip the "Read more" link text with configured value.
regards.
#3
Can you explain the functionality behind what you've done here? I don't understand what you mean by "strip the 'Read More' link text with configured value." The link text is already fully customizable.