Embed a view in a tpl.php file

Submitted by Feargal O Kane on Mon, 23/03/2009 - 15:59
Snippet for embedding a view directly into a tpl.php file
<?php
$view = views_get_view('viewname');
$display = $view->execute_display('block_1');
print $display['content'];
?> Drupal Planet
- Drupalpress, Drupal in the Health Sciences Library at UVA: Rule Scheduling and Emailing Views According to CCK date fields
- Patrick J Waters: Recent Project: Converting the BMJ (British Medical Journal) to Drupal
- Mediacurrent: Shun Your Clients to Serve Them Better
- Phase2 Technology: Office of the New York Attorney General Finds Great Fit with OpenPublic: An Interview with New Amsterdam Ideas
- Clemens Tolboom: A pinch of Symfony for D8MI?