Scroll
The function views_get_view_result is returning an empty array for some reason.
Forums
Hello.
I created a view named view-last-news, which returns a list of the latest news.
In the view construction mode, the preview shows everything correctly.
I'm trying to read the information stored in this view using the function call views_get_view_result, and this function call is located in the file node-[node-type].tpl.php
I'm writing the following code:
$wr=views_get_view_result('view-last-news');
print_r($wr);
But for some reason, it returns an empty array
Array ( )
Moreover, when I created a block with this view, that block displays everything correctly.
Could you please tell me why the returned array is empty if this view is supposed to contain data?