Created
January 17, 2013 15:01
-
-
Save johnmcc/4556510 to your computer and use it in GitHub Desktop.
Embedding a view programmatically
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 // view, display, any additional contextual filters ?> | |
<?php $view = views_embed_view("view_name", "display_name", $node->nid); ?> | |
<?php if(strpos($view, "view-content") !== FALSE){ ?> | |
<?php echo $view; ?> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment