Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.8
Component:
node data
Priority:
Normal
Category:
Support request
Assigned:
Issue tags:
Reporter:
Created:
14 Dec 2009 at 15:05 UTC
Updated:
20 Jul 2010 at 00:10 UTC
Hi,
I have a nodes view, from which I try to exclude nodes given by another view.
So I added a node argument in my view, and gave it a default argument "php code", which is this ('dernierstar' is the second view, the one that gives nodes IDs to exclude) :
$view_name = [dernierstar];
$view_display = [0];
$view_arguments = array();
$this_view = views_get_view($view_name);
$this_view->set_item($view_display, 'filter', 'nid_php', NULL);
$this_view->set_display($view_display);
$this_view->set_arguments($view_arguments);
$this_view->pre_execute();
$this_view->execute();
$results = $this_view->result;
$this_view->destroy();
print $results;Where am I wrong ?
Thanks !
Comments
Comment #1
dave reidComment #2
esmerel commentedNo activity in 6 months