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

joachim’s picture

I'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.

joachim’s picture

Status: Active » Closed (fixed)

Closing old support requests.