Display fields from a view in node template I'm learning views in drupal 7 and I just created an unformatted list view that is displaying the titles of a few nodes. The preview looks great and so does the view page. 

I have a div block in a custom node template that I want now to view this "view" in. What code do I need to put into my node template to access the view function?

I looked at the system view template (views-view.tpl.php) that is generating what I want and I see that there is a $rows variable:

&lt;?php if ($rows): ?&gt;
  &lt;div class="view-content"&gt;
    &lt;?php print $rows; ?&gt;
  &lt;/div&gt;


But when I place that into my node template it doesnt work (probably because I need a preproccess?).

Am I going about this the wrong way? Is there an easier way to get views into another template file? I considered using a block. But I thought that once I nail this, then I don't have to mess with blocks.

FYI: I saw this post but I am not sure where to put the code that he recommended.

Thanks! I really appreciate it.
Drupal 6 

  $view = views_get_view('view-name');
  print views_build_view('embed', $view);


Drupal 7 

&lt;?php echo views_embed_view('view-name', $display_id = 'display-name') ?&gt;