Closed (fixed)
Project:
Node reference views
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Jan 2010 at 11:28 UTC
Updated:
16 Jun 2011 at 12:58 UTC
Hi,
I use your very practical module but I have a question :
I want to use the count of results of the view in another view (to class the nodes by number of results of node reference CCK). To make that I use the computed field module. It works for a "standard' view but not with the view used with your module. I can't use as I want the argument.
That is the code I put in the computed field of my view but it does not work :
<?php
$node_id = $data->node_vid;
$view_args = array($node_id);
$display_id = 'default';
$view = views_get_view( 'NAME_OF_MY_VIEW' );
$view->execute_display($display_id , $view_args);
$count = count( $view->result );
print $count;
?>
For all nodes, I have "1" result et not the number of my reference cck.
Do you understand my problem ?
Comments
Comment #1
joachim commentedI've no idea; try debugging that code to see what results you get at each step.
I can't see any reason why the fact your view is embedded in a noderef field would make any difference to it.
Comment #2
joachim commentedClosing old support requests.