Last active
December 10, 2015 08:08
-
-
Save BramEsposito/4405453 to your computer and use it in GitHub Desktop.
Drupal: Embed a view with custom parameters. (works in node body with PHP text format == dirty hack)
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 | |
$display_id = "departement"; | |
$args = array("view argument"); | |
$view = views_get_view('view machine name'); | |
$view->items_per_page = 0; // set number of items per page. 0 is all. | |
$content = $view->execute_display($display_id, $args); | |
print($content['content']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment