Drupal return number of results in a View

前端 未结 6 1152
执念已碎
执念已碎 2021-02-07 19:47

I have a view in Drupal that filters my content. It brings back 7 rows. All I want to return is the number or results returned(7). Is this possible?

I tried using the Vi

6条回答
  •  名媛妹妹
    2021-02-07 19:57

    With Views 3 you may need to do

    $view->get_total_rows = TRUE;
    $total_items = $view->query->pager->get_total_items();
    

提交回复
热议问题