Drupal view shows only one row

左心房为你撑大大i 提交于 2019-12-24 19:23:55

问题


I've got a view defined with 3 nodes, in views-view-unformatted--my-view--default.tpl.php I loop throws $rows but get only first result, if I try this:

$view = views_get_current_view();
error_log(count($view->result)); //<- This returns only 1 row
error_log($view->total_rows); //<- This shows nothing, as if property didn't exist

foreach ($rows as $id => $row):
    print $row; //<- Only print first node
endforeach;

What is the problem? Why can't I find the 3 of them?

EDIT I found out that it's only showing one row for not authenticated users, actually for not administrators, I reviewed view access restrictions and are set to none. As far as I know I don't have any content access restrictions and I reviewed permissions and everything seems ok.

Where else can I look?

Thank you

来源:https://stackoverflow.com/questions/11185194/drupal-view-shows-only-one-row

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!