Do you want to display a "Read More..." link inlined with the blog post's teaser?
I found the Drupal Read More Link module. I couldn't make this module work with content which is created using WYSIWYG editors. Actually, there is an issue related to this problem.
This is one solution.
<?php function _mytheme_read_more_link(&$html, $nid){ //check if the string ends with tag closing bracket //get the position of the tag opening bracket for the last tag //insert the text that position } else { //no tag found - append the link HTML $html .= $link; } } ?>
What this function does is to check whether there is a closing tag bracket in the end of the string. If such bracket was found, the "read more" link is inserted just before opening bracket of the last tag.
You could call this function from the template.php file as follows:
<?php function mytheme_preprocess_node(&$vars) { if($vars['node']->type == 'blog'){ if ($vars['teaser'] ){ _mytheme_read_more_link($vars['content'], $vars['node']->nid); } } } ?>
It is possible that the WYSIWYG editor has inserted additional <br/> tags in the end of the teaser so you should temporally turn off formatting of the text to check the generated HTML code.
Hope this function helps you!
