上次定了一个公司最新公司动态的区块(http://hellodrupal.info/node/37 ),客户喜欢把推荐的新闻标题改为红色衔接,想到最简单的方法就是对于sticky的文件CSS定义一下就可以了。
借用了node_title_list. api 想了解更多此API 请访问 http://api.drupal.org/api/function/node_title_list
sticky.
$items[] ="
sticky."\">".l($node->title, 'node/'.$node->nid, !empty($node->comment_count) ? array('attributes' => array('title' => format_plural($node->comment_count, '1 comment', '@count comments'))) : array())."
";
$num_rows = TRUE;
}
return $num_rows ? theme('node_list', $items, $title) : FALSE;
}
?>
具体效果如图所示:
评论
这段代码写在哪里?
这段代码写在哪里?
发表新评论