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:
<?php if ($rows): ?>
<div class="view-content">
<?php print $rows; ?>
</div>
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.