Last updated May 6, 2008. Created by Qrczak on May 6, 2008.
Log in to edit this page.
Scenario: we want show comments below each teaser on front page.
Step 1
We need to install Viewfield module. Viewfield is a CCK field that allows to put views directly into nodes.
Step 2
Next we need add new field (View Reference) to our content type.
Step 3
In settings we need to check "Force default", in "Allowed views" check comments view (or node_comments view if you use Node comments module), and below from list choose again the same view and as an "Arguments" set [nid]
Step 4
In Content Templates in teaser we need to add at the end of code
<?php
print $node->content['field_name']['#value']
?>The field_name is the name of View Reference field in our node type
And that's all!
During create new content there no additional field to fill (becouse we checked "Force default" in View Reference field settings).