2011-10-12 56 views

回答

1

如果你不想寫代碼,那麼你可以重寫與面板的節點模板,並通過它創建一個變體可以在變形添加評論線程的節點。我認爲這樣做更容易。

0

在Drupal 7的可以使用以下代碼中使用節點ID

$nid = 2; // node ID 
    $comments = db_select('comment') 
       ->fields('comment', array('name','subject')) 
       ->condition('nid', $nid, '=') 
       ->execute() 
       ->fetchAssoc(); 
    foreach($comments as $comment) { 
     print your comments here 
    } 

在Drupal的6可以使用comment_render()得到一個節點的所有評論;