views:

784

answers:

1

I think the answer might be obvious but I can't seem to figure it out.

How do I render a view I've created in Views 2 (Drupal) in a page-pagename.tpl.file? My thought was that it would be some sort of PHP snippet but I can't find documentation about it.

Any thoughts that might steer me in the right direction.

+1  A: 

The solution is here:

http://views-help.doc.logrus.com/help/views/embed

Also "function" can be replaced with "print" and the additional param brackets can be removed.

So it will look like this:

$name = "yourviewnamegoeshere";
print views_embed_view($name, $display_id = 'default');

Scott