Hello there,

I am creating News content type using cck module.
I've used views to display latest news.
I've added title and body of node.
I've used node type=news for filter. and in short criteria I've used created date of node as desc.

I wanted to create a block view which displays news content with read more link.

Can someone help me?

CommentFileSizeAuthor
#2 Screenshot-1.png60.29 KBkrupsonline4u@gmail.com

Comments

krupsonline4u@gmail.com’s picture

I am using drupal 6.

krupsonline4u@gmail.com’s picture

Issue tags: +read more link
StatusFileSize
new60.29 KB

Done..
follow below steps:

1. Create template file "views-view-field-news-body.tpl.php" under theme directory.
2. Edit code:

<?php
// $Id: views-view-field.tpl.php,v 1.1 2008/05/16 22:22:32 merlinofchaos Exp $
 /**
  * This template is used to print a single field in a view. It is not
  * actually used in default Views, as this is registered as a theme
  * function which has better performance. For single overrides, the
  * template is perfectly okay.
  *
  * Variables available:
  * - $view: The view object
  * - $field: The field handler object that can process the input
  * - $row: The raw SQL result that can be used
  * - $output: The processed output that will normally be used.
  *
  * When fetching output from the $row, this construct should be used:
  * $data = $row->{$field->field_alias}
  *
  * The above will guarantee that you'll always get the correct data,
  * regardless of any changes in the aliasing that might happen if
  * the view is modified.
  */
?>

<?php 
$output = str_replace("\r\n",'',$output);
$output .= "<a href='?q=node/".$row->nid."'>read more</a>";
?>
<?php print $output; ?>

thats it.

run your view/block.

Note: can see attached file for the look