Last active
August 29, 2015 14:17
-
-
Save henrytran9x/1684f8f609e8dd143961 to your computer and use it in GitHub Desktop.
Programmatically render views in Drupal 7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
print views_embed_view('VIEWS_MACHINE_NAME', 'DISPLAY_ID', $view_arg); | |
$view = views_get_view('VIEWS_MACHINE_NAME'); | |
$view->set_display('DISPLAY_ID'); | |
print $view->get_title(); | |
print $view->preview('DISPLAY_ID'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment